Part Number Hot Search : 
M7003 MCT5211 GSIB2 PS2608 SUPA5 AK8775 CF6060K TPD4121K
Product Description
Full Text Search
 

To Download HD64F7058 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  32 rev. 3.00 revision date: sep. 17, 2004 www.renesas.com renesas superh tm risc engine sh-2e sh7058 f-ztat tm hardware manual rej09b0046-0300h
1. these materials are intended as a reference to assist our customers in the selection of the renesas technology corp. product best suited to the customer's application; they do not convey any license under any intellectual property rights, or any other rights, belonging to renesas technology corp. or a third party. 2. renesas technology corp. assumes no responsibility for any damage, or infringement of any third- party's rights, originating in the use of any product data, diagrams, charts, programs, algorithms, or circuit application examples contained in these materials. 3. all information contained in these materials, including product data, diagrams, charts, programs and algorithms represents information on products at the time of publication of these materials, and are subject to change by renesas technology corp. without notice due to product improvements or other reasons. it is therefore recommended that customers contact renesas technology corp. or an authorized renesas technology corp. product distributor for the latest product information before purchasing a product listed herein. the information described here may contain technical inaccuracies or typographical errors. renesas technology corp. assumes no responsibility for any damage, liability, or other loss rising from these inaccuracies or errors. please also pay attention to information published by renesas technology corp. by various means, including the renesas technology corp. semiconductor home page (http://www.renesas.com). 4. when using any or all of the information contained in these materials, including product data, diagrams, charts, programs, and algorithms, please be sure to evaluate all information as a total system before making a final decision on the applicability of the information and products. renesas technology corp. assumes no responsibility for any damage, liability or other loss resulting from the information contained herein. 5. renesas technology corp. semiconductors are not designed or manufactured for use in a device or system that is used under circumstances in which human life is potentially at stake. please contact renesas technology corp. or an authorized renesas technology corp. product distributor when considering the use of a product contained herein for any specific purposes, such as apparatus or systems for transportation, vehicular, medical, aerospace, nuclear, or undersea repeater use. 6. the prior written approval of renesas technology corp. is necessary to reprint or reproduce in whole or in part these materials. 7. if these products or technologies are subject to the japanese export control restrictions, they must be exported under a license from the japanese government and cannot be imported into a country other than the approved destination. any diversion or reexport contrary to the export control laws and regulations of japan and/or the country of destination is prohibited. 8. please contact renesas technology corp. for further details on these materials or the products contained therein. 1. renesas technology corp. puts the maximum effort into making semiconductor products better and more reliable, but there is always the possibility that trouble may occur with them. trouble with semiconductors may lead to personal injury, fire or property damage. remember to give due consideration to safety when making your circuit designs, with appropriate measures such as (i) placement of substitutive, auxiliary circuits, (ii) use of nonflammable material or (iii) prevention against any malfunction or mishap. keep safety first in your circuit designs! notes regarding these materials
general precautions on handling of product 1. treatment of nc pins note: do not connect anything to the nc pins.the nc (not connected) pins are either not connected to any of the internal circuitry or are they are used as test pins or to reduce noise. if something is connected to the nc pins, the operation of the lsi is not guaranteed. 2. treatment of unused input pins note: fix all unused input pins to high or low level.generally, the input pins of cmos products are high-impedance input pins. if unused pins are in their open states, intermediate levels are induced by noise in the vicinity, a pass-through current flows internally, and a malfunction may occur. 3. processing before initialization note: when power is first supplied, the product?s state is undefined.the states of internal circuits are undefined until full power is supplied throughout the chip and a low level is input on the reset pin. during the period where the states are undefined, the register settings and the output state of each pin are also undefined. design your system so that it does not malfunction because of processing while it is in this undefined state. for those products which have a reset function, reset the lsi immediately after the power supply has been turned on. 4. prohibition of access to undefined or reserved addresses note: access to undefined or reserved addresses is prohibited. the undefined or reserved addresses may be used to expand functions, or test registers may have been be allocated to these addresses. do not access these registers; the system?s operation is not guaranteed if they are accessed.
rev. 3.0, 09/04, page i of xxxviii preface the sh7058 is a single-chip risc (reduced instruction set computer) microcomputer that has the 32-bit internal architecture cpu, sh-2e, as its core, and also includes peripheral functions necessary for system configuration. the sh7058 is equipped with on-chip peripheral functions necessary for system configuration, including a floating-point unit (fpu), large-capacity rom and ram, a direct memory access controller (dmac), timers, a serial communication interface (sci), controller area network (hcan), a/d converter, and i/o ports, therefore, it can be used as a microprocessor built in a high-level control system. the sh7058 is an f-ztat?* (flexible zero turn-around time) version with flash memory as its on-chip rom, and it can rapidly and flexibly deal with each situation on an application system with fluid specifications from an early stage of mass production to full-scale production. note: * f-ztat? is a trademark of renesas technology, corp. target users: this manual was written for users who will be using the sh7058 f-ztat in the design of application systems. users of this manual are expected to understand the fundamentals of electrical curcuits, logical circuits, and microcomputers. objective: this manual was written to explain the hardware functions and electrical characteristics of the sh7058 f-ztat to the above users. refer to the sh-2e programming manual for a detailed description of the instruction set. notes on reading this manual: ? in order to understand the overall functions of the chip read the manual according to the contents. this manual can be roughly categorized into parts on the cpu, system control functions, peripheral functions and electrical characteristics. ? in order to understand the details of the cpu's functions read the sh-2e programming manual. rule: bit order: the msb (most significant bit) is on the left and the lsb (least significant bit) is on the right. releated manuals: the latest versions of all related manuals are available from our web site. please ensure you have the latest versions of all documents you require. http://www.renesas.com/
rev. 3.0, 09/04, page ii of xxxviii sh7058 f-ztat manuals: manual title document no. sh7058 f-ztat hardware manual this manual sh-2e programming manual users manuals for development tools: manual title document no. sh series c/c++ compiler, assembler, optimizing linkage editor user's manual ade-702-246 sh series simulator/debugger (for windows) user's manual ade-702-186 sh series simulator/debugger (for unix) user's manual ade-702-203 high-performance embedded workshop user's manual ade-702-201 application note: manual title document no. c/c++ compiler
rev. 3.0, 09/04, page iii of xxxviii main revisions for this edition item page revisions (see manual for details) 1.2 block diagram figure 1.1 block diagram 7 corrected errors dmac (4 channels) sci (5 channels) cmt (2 channels) aud h-udi atu-ii a/d converter wdt bsc interrupt controller clock pulse generator port/control signals port port port/address signals pk15/to8p pk14/to8o pk13/to8n pk12/to8m pk11/to8l pk10/to8k pk9/to8j pk8/to8i pk7/to8h pk6/to8g pk5/to8f pk4/to8e pk3/to8d pk2/to8c pk1/to8b pk0/to8a pj15/ti9f pj14/ti9e pj13/ti9d pj12/ti9c pj11/ti9b pj10/ti9a pj9/tio5d pj8/tio5c pj7/tio2h pj6/tio2g pj5/tio2f pj4/tio2e pj3/tio2d pj2/tio2c pj1/tio2b pj0/tio2a ph15/d15 ph14/d14 ph13/d13 ph12/d12 ph11/d11 ph10/d10 ph9/d9 ph8/d8 ph7/d7 ph6/d6 ph5/d5 ph4/d4 ph3/d3 ph2/d2 ph1/d1 ph0/d0 pa0/ti0a pa1/ti0b pa2/ti0c pa3/ti0d pa4/tio3a pa5/tio3b pa6/tio3c pa7/tio3d pa8/tio4a/adto0a pa9/tio4b/adto0b pa10/tio4c/adto1a pa11/tio4d/adto1b pa12/tio5a pa13/tio5b pa14/txd0 pa15/rxd0 pb0/to6a pb1/to6b pb2/to6c pb3/to6d pb4/to7a/to8a pb5/to7b/to8b pb6/to7c/to8c pb7/to7d/to8d pb8/txd3/to8e pb9/rxd3/to8f pb10/txd4/htxd0/to8g pb11/rxd4/hrxd0/to8h pb12/tclka/ ubctrg pb13/sck0 pb14/sck1/tclkb/ti10 pb15/puls5/sck2 pc0/txd1 pc1/rxd1 pc2/txd2 pc3/rxd2 pc4/ irq0 pg0/puls7/hrxd0/hrxd1 pg1/ irq1 pg2/ irq2 /adend pg3/ irq3 / adtrg0 pf15/ breq pf14/ back pf8/ wait pf9/ rd pf7/ wrh pf6/ wrl pf13/ cs3 pf12/ cs2 pf11/ cs1 pf10/ cs0 pf5/a21/ po d pf4/a20 pf3/a19 pf2/a18 pf1/a17 pf0/a16 pe15/a15 pe14/a14 pe13/a13 pe12/a12 pe11/a11 pe10/a10 pe9/a9 pe8/a8 pe7/a7 pe6/a6 pe5/a5 pe4/a4 pe3/a3 pe2/a2 pe1/a1 pe0/a0 pd0/tio1a pd1/tio1b pd2/tio1c pd3/tio1d pd4/tio1e pd5/tio1f pd6/tio1g pd7/tio1h pd8/puls0 pd9/puls1 pd10/puls2 pd11/puls3 pd12/puls4 pd13/puls6/htxd0/htxd1 pl0/ti10 pl1/tio11a/ irq6 pl2/tio11b/ irq7 pl3/tclkb pl4/ adtrg0 pl5/ adtrg1 pl6/adend pl7/sck2 pl8/sck3 pl9/sck4/ irq5 pl10/htxd0/htxd1/htxd0 & htxd1 pl11/hrxd0/hrxd1/hrxd0 & hrxd1 pl12/ irq4 pl13/ irqout ck extal xtal pllv cc pllv ss pllcap vcc ( 8) pvcc1 ( 4) pvcc2 ( 6) v cl ( 3) vss ( 21) avref ( 2) avcc ( 2) avss ( 2) an31?0 audrst audmd audata3?0 audck audsync tms trst tdi tdo tck res hstby fwe md2 md1 md0 nmi wdtovf port/data signals port port : peripheral address bus (9 bits) : peripheral data bus (16 bits) : internal address bus (32 bits) : internal upper data bus (16 bits) : internal lower data bus (16 bits) cpu fpu multiplier rom (flash) 1 mb ram 48 kb hcan ii (2 channels) 1.3.1 pin arrangement figure 1.3 pin assignments 9 newly added 1.3.2 pin functions table 1.2 pin functions 10-18 bp-272 added 1.3.3 pin assignments table 1.3 pin assignments 19-27 bp-272 added 7.1.1 features 101 ? notification of interrupt occurrence can be reported externally ( irqout pin) for example, it is possible to request the bus if an external bus master is informed that an on-chip peripheral module interrupt request has occurred when the chip has released the bus. 7.4.1 interrupt sequence figure 7.2 interrupt sequence flowchart 120 note amended 1. as irqout is synchronized with a peripheral clock p , it may be output later than a cpu interrupt request.
rev. 3.0, 09/04, page iv of xxxviii item page revisions (see manual for details) 7.5 interrupt response time table 7.5 interrupt response time 122 table amended item peripheral module nmi number of states irq notes synchronizing input signal (synchronized with peripheral clock p ) with internal clock and dmac activation judgment 0 or 6 [0 or 3] 1 to 4 [1 or 2] 6 to 9 [3 to 5] interrupt response time (7 or 13) + m1 + m2 + m3 + x total: (8 to 11) + m1 + m2 + m3 + x (13 to 16) + m1 + m2 + m3 + x 17 + 2 (m1 + m2 + m3) + m4 maximum: 15 + 2 (m1 + m2 + m3) + m4 20 + 2 (m1 + m2 + m3) + m4 10 minimum: 11 16 for the number of states required for each interrupt, see the note ( * ) below. the values enclosed in [ ] are values for when the multiplication ratio is 4. wait for completion of sequence currently being executed by cpu x ( 0) the longest sequence is for interrupt or address-error exception processing (x = 4 + m1 + m2 + m3 + m4). if an interrupt-masking instruction follows, however, the time may be even longer. time from start of interrupt exception processing until fetch of first instruction of exception service routine starts note: * number of states needed for synchronization and dmac activation judgment the relations between numbers of states needed for synchronizing an input signal (synchronized with the peripheral clock p ) with the internal clock and dmac activation judgment and vector numbers are shown below. 0 state: 9, 10, 12, 13, 14, 72, 74, 76, 78, 189, 193, and 224 6 states: peripheral module interrupts other than the above. however, vector number 222 (hcan0/rm0) is different from the others. for an interrupt with vector number 222 (hcan0/rm0), the needed states differ from other interrupts since the interrupt by hcan0 mailbox 0 can activate the dmac. hcan0 mailbox 0: 7 states other than above: 6 states the same number of states is needed to cancel interrupt sources. if the necessary number of states is not secured after flag clear of the interrupt source, the interrupt may occur again. 5 + m1 + m2 + m3 performs the pc and sr saves and vector address fetch. compare identified interrupt priority with sr mask level 22 2 7.5 interrupt response time figure 7.4 example of pipeline operation when an irq interrupt is accepted 123 figure amended interrupt acceptance instruction interrupt controller processing synchronization of irq irq 2 6 to 9 3 m1 m2 1 m3 1 fdeemmemee f fd e 5 + m1 + m2 + m3 overrun fetch interrupt service routine start instruction 9.1.5 address map table 9.3 address map ? number of access cycles for on-chip peripheral module registers 146 newly added 10.3.2 dma transfer requests 179 description added in on-chip peripheral module request mode , when the dmac accepts the transfer request, the next transfer request is ignored until a single transfer ends in cycle steal mode or all transfers end in burst mode. only when the address reload function is used, the next transfer request is accepted after the fourth transfer.
rev. 3.0, 09/04, page v of xxxviii item page revisions (see manual for details) 10.3.2 dma transfer requests table 10.2 selecting on-chip peripheral module request modes with the rs bits 180, 182 table amended dmac transfer request source dmac transfer request signal transfer source transfer destination bus mode rs0 rs1 rs2 rs3 rs4 hcan0 rm0 (hcan0 receive interrupt) mb0-mb15 don't care * burst/cycle- steal 1 1 0 0 0 m b0-m b15: hcan0 message data 10.3.11 dmac access from cpu 193 description amended the space addressed by the dmac is 4-cycle space. therefore, when the cpu becomes the bus master and accesses the dmac, a minimum of four internal clock cycles ( ) are required for one bus cycle. also, since the dmac is located in word space, while a word-size access to the dmac is completed in one bus cycle, a longword-size access is automatically divided into two word accesses, requiring two bus cycles ( eight basic clock cycles). these two bus cycles are executed consecutively; a different bus cycle is never inserted between the two word accesses. this applies to both write accesses and read accesses. 11.2.21 offset base registers (osbr) 341 bit table amended dedicated input capture registers with the same input trigger signal as that for channel 0 icr0a offset base registers 1 and 2 (osbr1, osbr2) description amended osbr1 and osbr2 are 16-bit read-only registers used exclusively for input capture. same as the channel 0 input capture register (icr0a), osbr1 and osbr2 use the ti0a input as their trigger signal, and store the tcnt1a or tcnt2a value on detection of an edge. 11.3.1 overview channel 10: (3) multiplied clock correction block 366 description amended ? when the 16-bit correction counter 10f (tcnt10f) value exceeds that in 16-bit correction counter 10e (tcnt10e) , no count-up operation is performed. 11.3.2 free-running counter operation and cyclic counter operation figure 11.13 free-running counter operation and overflow timing 367 figure amended p tstr1 str0 tcnt0 clock tcnt0 tsr0 ovf0 00000001 00000002 00000006 00000005 00000004 00000003
rev. 3.0, 09/04, page vi of xxxviii item page revisions (see manual for details) 11.3.8 twin-capture function 373 description amended when tcnt0, tcnt1a, and tcnt2a in channel 0, channel 1, and channel 2 are started by a setting in the timer start register (tstr), and an edge of ti0a input (a trigger signal) is detected, the tcnt1a value is transferred to osbr1, and the tcnt2a value to osbr2. 11.3.9 pwm timer function figure 11.21 pwm timer operation 375 figure amended p str tcnt6a clock tcnt6a cylr6a bfr6a dtr6a to6a tsr6 cmf6a write to bfr6a pwm output does not change for one cycle after activation cycle 0002 0001 0002 0003 0004 * 11.3.9 pwm timer function figure 11.22 complementary pwm mode operation 376 figure replaced 11.3.12 channel 10 functions figure 11.28 tcnt10a capture operation and compare-match operation 381 figure amended tcnt10a tstr1 str10 tcnt10a agck icr10a ocr10a 00000003 00000001 tsr10 cmf10a tsr10 imf10a 00000002 00000000 12345678 55555556 12345677 1234 5678 00000001 55555555 55555556 55555557 capture transfer signal tcnt reset signal cleared by software cleared by software p multiplied clock generation function: figure 11.30 tcnt10c operation 383 description amended tst10 str10
rev. 3.0, 09/04, page vii of xxxviii item page revisions (see manual for details) multiplied clock correction function: figure 11.32 tcnt10d operation figure 11.33 tcnt10e operation figure 11.34 tcnt10f operation (at startup) 384, 385 description amended tst10 str10 when the tcnt10 f value exceeds the tcnt10 e value , no count-up operation is performed. multiplied clock correction function: figure 11.35 tcnt10f operation (end of cycle, acceleration, deceleration) 386 description amended tst10 str10 figure amended 005a 0063 00 62 0064 0065 0066 0002 0080 00 01 0003 0076 0077 0078 0079 007a 03 04 str10 agck tcnt10e tcnt10e clock tcnt10f agckm tcnt clock operating on agckm tcnt1, tcnt2 reset trigger tcnt1, tcnt2 tcnt10d 0060 005a 0061 0062 0063 0064 0065 0066 0076 0077 0078 0079 007a 00 00 0001 0002 0003 0063 00 62 005a 0064 0065 00 66 0002 0000 00 01 0003 0076 0077 0078 0079 007a 01 00 p note: multiplication factor of 32, tcclr10 = h'0080 cleared to h'00 by software multiplied clock correction function: figure 11.36 tcnt10f operation (end of cycle, steady-state) 387 005a 005a 0063 00 62 0064 0065 0066 0002 0001 0080 0003 007e 007f 03 04 str10 agck tcnt10e tcnt10e clock tcnt10f agckm tcnt clock operating on agckm tcnt1, tcnt2 reset trigger tcnt1, tcnt2 tcnt10d 0060 005a 0061 0062 0063 0064 0065 0066 007e 007f 0080 0081 0082 00 00 0001 0002 0003 0063 00 62 0064 0065 00 66 0002 007e 007f 0000 0001 01 00 p note: multiplication factor of 32, tcclr10 = h'0080 set to h'00 by software 11.7 usage notes contention between dcnt write and counter clearing by underflow: 420 note amended note: in the sh7055, a write to dcnt from the cpu is not attempted, but retention of h ? 0000 takes precedence. note that its operation is different
rev. 3.0, 09/04, page viii of xxxviii item page revisions (see manual for details) 11.7 usage notes figure 11.72 contention between dcnt write and underflow 420 figure amended underflow signal dcnt interrupt status flag (osf) 0000 5555 0001 h'5555 is written because dcnt write is given priority 12.1.4 register configuration table 12.2 advanced pulse controller register 429 note amended note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles. 14.1.3 register configuration table 14.1 register configuration 453 note amended notes: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles for byte access and word access, and eight or nine internal clock ( ) cycles for longword access. 15.1.4 register configuration table 15.2 registers 467 note amended notes: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles for byte access and word access, and eight or nine internal clock ( ) cycles for longword access. section 16 controller area network-ii (hcan-ii) 519- 616 description amended before register name hcan-ii_bit configuration register transmit wait register transmit wait cancel register receive complete register remote request register hcan-ii_bit timing configuration register transmit pending request register transmit cancel register data frame receive pending register remote frame receive pending register after 16.1.1 features 519, 520 description amended ? supports can specification 2.0a/2.0b and iso- 11898 -1 description deleted ? flexible interrupt structure ? read section 16.8, usage notes carefully. the following features have been added in the hcan- ii. ? irr0 function to notify a software reset and halt
rev. 3.0, 09/04, page ix of xxxviii item page revisions (see manual for details) 16.1.1 features 520 description deleted ? halt mode status bit and error passive status bit added to gsr. ? supports various test modes 16.2.2 each block function (1) microprocessor interface (mpi) 522 description deleted the mpi allows communication between the host cpu and the hcan's registers/mailboxes to control . the memory interface, and the data controller, etc. (2) mailboxes description deleted ? can message data (for can data frames) ? local acceptance filter mask (lafm) during reception . ? 3-bit mailbox configuration, automatic transmit bit for remote request, new message control bit . (4) timer important: added important: the timer function is not supported by the sh7058. 16.3.1 mailbox configuration 526 note amended note: the message control (stdid/extid/rtr/zde), timestamp, and lafm/transmission trigger time fields can only be accessed in word size (16 bits), whereas the message control (nmc/atx/mbc/dlc) and the message data area can be accessed in word (16-bit) or byte (8-bit) size. also, when the setting of the mbc bits makes the mailbox inactive, all settings other than the mbc bits must be initialized to 0 because an unused mailbox affects the ram configuration. when the lafm is not used to receive messages, it must be cleared to 0. 16.3.1 mailbox configuration figure 16.3 mailbox-n configuration 528 note amended notes: 1. all bits shadowed in gray are reserved and the write value should be 0. the value read as the initial value is not guaranteed.
rev. 3.0, 09/04, page x of xxxviii item page revisions (see manual for details) 16.3.2 message control field 530- 532 table amended register name address bit bit name description mbx[4], mbx[5] * h'104 + n x 32 15 ccm can-id compare match when this bit is set, message reception in the corresponding mailbox can generate two triggers. if tcr9 is set to 1, tcr14 is cleared to freeze icr0. if tcr10 is set to 1, tcntr (timer counter register) is automatically cleared and the losr (local offset register) value is set. important: this function is not supported by the sh7058. thus the write value should be 0. 14 tte time trigger enable when this bit is set, a mailbox in which txpr has been already set transmits a message at a time set in the tx trigger time field. important: if this bit is set, a failure occurs during message transmission. therefore setting is prohibited. the write value should be 0. the value read as the initial value is not guaranteed. mbx[4], mbx[5] * h'104 + n x 32 13 nmc new message control when this bit is cleared, a mailbox in which pxpr/pfpr has been already set does not store the new message but retains the previous one and sets the umsr corresponding bit. when this bit is set, a mailbox in which pxpr/pfpr has been already set stores the new message and sets the umsr corresponding bit. if a message is received in a mailbox in overwrite mode (nmc = 1), the host cpu must perform an additional check at the end of the data reading from the mailbox in order to guarantee that the mailbox data have not been corrupted during such operation by another receive message. the additional check, to be performed at the end of the mailbox access, consists in verifying that the associated bit of umsr has not been set and so no overwrite has occurred; in case such bit is set data have been corrupted and so the message must be discarded. mbx[4], mbx[5] * h'104 + n x 32 11 dart disable automatic retransmission when this bit is set, it disables the automatic retransmission of a message in the event of an error on the can bus or an arbitration lost on the can bus. when this function is used, the corresponding txcr bit is automatically set at the start of transmission. when this bit is cleared, the hcan tries to transmit the message as many times as required until it is successfully transmitted or it is cancelled by the txcr. important: this function is not supported by the sh7058. thus the write value should be 0. the value read as the initial value is not guaranteed.
rev. 3.0, 09/04, page xi of xxxviii item page revisions (see manual for details) 16.3.2 message control field 533- 534, 537 mbx[4], mbx[5] * h'104 + n x 32 6 tct timer counter transfer when this bit is set, a mailbox is set for transmission, and the dlc is set to 4, the tcntr value, at the sof, is embedded in the second and third bytes of the message data, instead of msg_data_2 and msg_data_3, and the cycle_count in the first byte instead of msg_data_0[3:0] when this mailbox starts transmission. this function will be useful when the hcan performs a time master role to transmit the time reference message. for example, considering that two hcan controllers are connected in the same network and that the receiver stores the message in mailbox n, the data format is shown as figure 16.4 depending on the endian setting for the can bus (mcr4). important: this function is not supported by the sh7058. thus the write value should be 0. the value read as the initial value is not guaranteed. mbx[4], mbx[5] * h'104 + n x 32 5 cbe can bus error an external fault-tolerant can transceiver can be used together with the hcan module. if the error output pin of the transceiver (normally active low) is connected to the can_nerr pin of this lsi, the value of the can_nerr pin is stored into this bit at the end of each transmission/reception (if the message is stored). the inverted value of the can_nerr pin is set to this bit. if the error output pin is active high, the setting value is not inverted. when this bit is set, it indicates a potential physical error with the can bus. as the can_nerr value is updated after the transmission or reception in the corresponding mailbox, non-interrupt is dedicated to this function but instead the normal transmit end interrupt (irr6) and normal receive end interrupt (irr2) should be considered. important: this function is not supported by the sh7058. thus the write value should be 0. the value read as the initial value is not guaranteed. 4 cle transmit clear enable when this bit is set, message reception in the corresponding mailbox cancels the wait messages in the transmission queue. this action is notified by irr8 and aback. important: this function is not supported by the sh7058. thus the write value should be 0. the value read as the initial value is not guaranteed. mbx[6] * h'106 + n x 32 15 to 0 timestamp [15:0] message reception: during message reception, when the sof or eof is detected, icr1 (input capture register 1) always captures the tcntr (timer counter register) value or the value of cycle_counter + tcntr[15:4], depending on the value of bit 3 in tmr (timer mode register), at either sof or eof depending on the value in tcr13 (timer control register), and the icr1 value is stored into the timestamp field of the corresponding mailbox. important: capturing at the sof is not supported by the sh7058. thus tcr13 should be set to eof detection mode. message transmission: during message transmission, the tcntr (timer counter register) value or the value of cycle_counter + tcntr[15:4], depending on the value of bit 3 in tmr (timer mode register) is captured when either the txpr bit or txack bit is set depending on the value in tcr12, and the captured value is stored into the timestamp field of the corresponding mailbox. important: capturing when the txpr bit is set is not supported by the sh7058. activation of the tcnr (timer) causes a problem in the sh7058 (timer usage is prohibited). therefore, the timestamp function is not supported. the write value should be 0. the value read as the initial value is not guaranteed.
rev. 3.0, 09/04, page xii of xxxviii item page revisions (see manual for details) 16.3.4 local acceptance filter mask (lafm)/tx-trigger time (ttt) lafm field: tx-trigger time field: 539, 540 table amended mbx[15], mbx[16] h'110 + n x 32 15 ? reserved the write value should be 0. the value read as the initial value is not guaranteed. 14 to 4 stdid_lafm [10:0] filter mask bits[10:0] for can base id[10:0] 0: corresponding bit to can base id set in mailbox is valid 1: corresponding bit to can base id set in mailbox is invalid 3, 2 ? reserved the write value should be 0. the value read as the initial value is not guaranteed. mbx[17], mbx[18] * h'112 + n x 32 15 to 12 ? reserved the write value should be 0. the value read as the initial value is not guaranteed. 7 to 4 ? reserved the write value should be 0. the value read as the initial value is not guaranteed. 16.4.2 master control register_n (mcr_n) (n = 0, 1) 544, 545 bit 7: description amended auto-wake mode bit 5: important: added important: usage of sleep mode is limited. be sure to carefully read section 16.8, usage notes. 16.4.3 general status register_n (gsr_n) (n = 0, 1) 550 bit 2: description amended message transmission in progress flag 16.4.4 hcan-ii_bit timing configuration register n (hcan-ii_bcr0_n, hcan- ii_bcr1_n)(n = 0, 1) table 16.5 tseg1 and tseg2 settings 554 important: added important: when brp[7:0] = h'00, tseg2[2:0] b'001 16.4.5 interrupt register_n (irr_n) (n = 0, 1) 555- 557, 559, 560 bit table amended 9 irr9 0 r bit: initial value: r/w: 8 irr8 0 r bit 12: description amended wake-up on bus activity interrupt flag bit 9: r/w amended r bit 4: description amended receive overload warning interrupt flag bit 3: description amended transmit overload warning interrupt flag bit 1: description amended data frame received interrupt flag
rev. 3.0, 09/04, page xiii of xxxviii item page revisions (see manual for details) 16.6 timer registers table 16.7 hcan timer registers 581 address amended channel 0 : h'd08c 16.7.2 hcan settings ? reset sequence figure 16.7 reset sequence 598 figure and notes amended reset sequence gsr3 = 0? power-on/software reset * 1 no yes hcan-ii is in normal mode detect 11 recessive bits and join the can bus activity receive * 3 transmit * 3 normal mode configuration mode clear irr[0] clear required imr bits set lafm clear mcr[0] set bit configuration register (bcr) set txpr to start transmission or stay idle to receive transmission mode clear all mailboxes * 2 (msg-control, data, timestamp, lafm ) mailbox setting (std-id, ext-id, dlc, rtr, ide, mbc, mbimr, atx, nmc, lafm, message data) notes: 1. a software reset can be performed at any time by setting mcr [0] = 1 4. deleted 16.7.3 message transmission sequence (1) event triggered transmission ? message transmission request figure 16.8 transmission request 599 figure amended hcan is in normal mode (mbc[x]=0x000 or 0x001 ) 16.7.4 message transmission cancellation sequence figure 16.10 transmission cancellation sequence 602 figure amended set aback[n] * 2 set txack[n] . 16.7.8 interrupt sources table 16.10 interrupt sources 607 note added hcan0 hcan1 rm0 rm1 note: * mailbox 0 only interrupt flag (irr bit) irr1 irr2 possible * description interrupt vector data frame reception remote frame reception hcan0 hcan1 dmac activation
rev. 3.0, 09/04, page xiv of xxxviii item page revisions (see manual for details) 16.7.10 hcan-ii port settings 609 note added note: * when the hcan-ii is used as a 64-buffer with one channel, care is required. be sure to carefully read section 16.8, usage notes. 16.7.11 can bus interface figure 16.16 high-speed interface using ha13721 610 newly added 16.8.4 txpr setting during transmission 612 descrioption amended when the hcan-ii is used with the baud rate set to 1 mbps and the txpr setting is made during transmission, there are the following limitations on the number of transmit mailboxes (mb) and the number of accesses to mailboxes until transmission is completed. note that there is no limitation when 500 kbps of baud rate is used. 16.8.6 mailbox access in hcan sleep mode figure 16.17 hcan sleep mode flowchart 614, 615 newly added 16.8.7 notes on port settings for 64- buffer hcan-ii with one channel 616 newly added 17.1.1 features 617 ? high-speed conversion conversion time: minimum 13.3 ? per channel (when peripheral clock ( p ) = 20 mhz) 17.1.3 pin configuration 620 description amended the adtrg0 and adtrg1 pins are used to provide a/d conversion start timing from off-chip. when the low level of a pulse is applied to one of these pins, a/d0, a/d1, or a/d2 starts conversion. 17.1.4 register configuration table 17.2 a/d converter registers 624 note replaced register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles.
rev. 3.0, 09/04, page xv of xxxviii item page revisions (see manual for details) 17.2.3 a/d control registers 0 to 2 (adcr0 to adcr2) ? bit 7 ? trigger enable (trge): 631 description amended when atu triggering is selected, clear bit 7 of registers adtrgr0 to adtrgr2 to 0. when external triggering is selected, upon input of the low level of a pulse to the adtrg0 or adtrg1 pin after trge has been set to 1, the a/d converter detects the falling edge of a pulse and sets the adst bit to 1 in adcr. the same operation is subsequently performed when 1 is written in the adst bit by software. external triggering of a/d conversion is only enabled when the adst bit is cleared to 0. when external triggering is used, the low level input to the adtrg0 or adtrg1 pin must be at least 1.5 p clock cycles in width. 17.4.3 analog input sampling and a/d conversion time table 17.4 a/d conversion time (single mode) 644 table amended item a/d conversion start delay time input sampling time a/d conversion time min cks = 0: peripheral clock (p ) = 10 to 20 mhz 10 ? 259 typ ? 64 ? max 17 ? 266 min cks = 1: peripheral clock (p ) = 10 mhz 6 ? 131 typ ? 32 ? max 9 ? 134 symbol t d unit states (peripheral clock (p )) t spl t conv 17.4.4 external triggering of a/d conversion 646 description amended the a/d converter can be activated by input of an external a/d conversion start trigger. to activate the a/d converter with an external trigger, first set the pin functions with the pfc (pin function controller) , then set the trge bit to 1 in the a/d control register (adcr), and set the extrg bit to 1 in the a/d trigger register (adtrgr). when a low level is input to the adtrg pin after these settings have been made, the a/d converter detects the falling edge of a pulse and sets the adst bit to 1. figure 17.7 shows the timing for external trigger input. the adst bit is set to 1 two states after the a/d converter samples the falling edge on the adtrg pin. the timing from setting of the adst bit until the start of a/d conversion is the same as when 1 is written into the adst bit by software. 18.5.7 operation waveform examples (c) hardware operation 690 description amended 2. an interrupt is generated if the a/d cycle enable bit ( adcylr) in the a/d trigger interrupt enable register (adtier) is set.
rev. 3.0, 09/04, page xvi of xxxviii item page revisions (see manual for details) 18.5.7 operation waveform examples (c) software operation figure 18.5 example of output waveform from mtad pwm 691 title amended figure amended dtselxa, dtselxb=0 (on-duty output is selected for pwm.) adcylrx adgrxa adgrxb addrxa addrxb adgrxb adgrxa adtoxa (a) (a) (a) ( a) (a) (a) (b) (b) (c) adtoxb note: x = 0 or 1 20.5.1 initialization 737 description amended 4. when the audsrst bit is set to 1 in the syscr1 register (see section 25.2.2) 5. when the mstop3 bit is set to 1 in the syscr2 register (see section 25.2.3) 21.3.8 port d io register (pdior) 759 bit table amended bit 8 : p d8ior 22.2.1 register configuration table 22.1 register configuration 804 note amended note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles. 22.3.1 register configuration table 22.3 register configuration 806 note amended note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles. 22.4.1 register configuration table 22.5 register configuration 808 note amended note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles. 22.5.1 register configuration table 22.7 register configuration 810 note amended note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles.
rev. 3.0, 09/04, page xvii of xxxviii item page revisions (see manual for details) 22.6.1 register configuration table 22.9 register configuration 813 note amended note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles. 22.7.1 register configuration table 22.11 register configuration 816 note amended note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles. 22.8.1 register configuration table 22.13 register configuration 819 note amended note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles. 22.9.1 register configuration table 22.15 register configuration 822 note amended note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles. 22.10.1 register configuration table 22.17 register configuration 824 note amended note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles. 22.11.1 register configuration table 22.19 register configuration 826 note amended note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles. 22.12.1 register configuration table 22.21 register configuration 828 note amended note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles. 23.4.1 registers table 23.4 (1) register configuration 844 note added 4. the registers except ramer can be accessed only in bytes, and the access requires four cycles. since ramer is in the bsc, when it is accessed in bytes or words, the access requires four cycles, and when it is accessed in longwords , the access requires eight cycles. 23.4.3 programming/erasing interface parameters (2.2) flash user branch address setting parameter (fubra: general register r5 of cpu) 855 description amended store general registers r8 to r15 and the control register gbr. general registers r0 to r7 are available without storing them.
rev. 3.0, 09/04, page xviii of xxxviii item page revisions (see manual for details) 23.5.2 user program mode (2.3) vbr is cleared to 0 and 1 is written to the sco bit of fccs, and then download is executed. 872 description amended if an access by the dmac or aud occurs during download, operation cannot be guaranteed. therefore, access by the dmac or aud must not be executed. 24.1 overview 941 description amended on-chip ram data can always be accessed in one cycle for a read and two states for a write, making the ram ideal for use as a program area, stack area, or data area, which require high-speed access. 25.1.3 related registers table 25.3 related registers 945 note amended 1. register access with an internal clock multiplication ratio of 4 requires four internal clock ( ) cycles for sbycr, and four or five internal clock ( ) cycles for syscr1 and syscr2. 27.2 dc characteristics table 27.2 correspondence between power supply names and pins 959- 968 description amended pin no. (fp-256h) 27.5 flash memory characteristics table 27.20 flash memory characteristics 1001 table amended item symbol min typ max unit programming time * 1 * 2 * 4 t p ? 3 200 ms/128 bytes erase time * 1 * 3 * 5 t e ? 2 20 s/block reprogramming count n wec 100 ?? times 4. the total reprogramming time (programming time + erasing time) is as follows. 40 s (typ.), reference value: 60 s, 80 s (max.) however, 90% of the values are within the reference value. 5. t p , t e distributes focusing on near the typ. value. a.1 address table a.1 address 1065 table amended abbrevi- ation register name h'fffff70a sycsr2 * 1 bit 3 bit 2 ? ? ??? bit 1 bit 0 bit 7 bit names appendix b pin states table b.1 pin states 1080 table amended type pin name aud module standby ubc ubctrg o appendix c product lineup table c.1 sh7058 f-ztat product lineup 1083 table amended product type sh7058 model name HD64F7058bf80l HD64F7058bf80k HD64F7058bp80l HD64F7058bp80k package 256-pin (fp-256h) 256-pin (fp-256h) 272-pin (bp-272) 272-pin (bp-272) operating temperature (except for w/e of flash memory) -40?c to 105 c -40?c to 125 c -40?c to 105 c -40?c to 125 c mark model name 64f7058f80 64f7058f80 64f7058bp80 64f7058bp80 f- ztat
rev. 3.0, 09/04, page xix of xxxviii item page revisions (see manual for details) appendix d package dimensions figure d.2 sh7058 package dimensions (bp-272) 1086 newly added
rev. 3.0, 09/04, page xx of xxxviii
rev. 3.0, 09/04, page xxi of xxxviii contents section 1 overview............................................................................................1 1.1 features .................................................................................................................... ......... 1 1.2 block diagram ............................................................................................................... ... 7 1.3 pin description............................................................................................................. ..... 8 1.3.1 pin arrangement .................................................................................................. 8 1.3.2 pin functions ....................................................................................................... 10 1.3.3 pin assignments................................................................................................... 19 section 2 cpu....................................................................................................29 2.1 register configuration...................................................................................................... 29 2.1.1 general registers (rn)......................................................................................... 29 2.1.2 control registers ................................................................................................. 30 2.1.3 system registers.................................................................................................. 31 2.1.4 floating-point registers....................................................................................... 32 2.1.5 floating-point system registers .......................................................................... 33 2.1.6 initial values of registers.................................................................................... 33 2.2 data formats................................................................................................................ ..... 34 2.2.1 data format in registers...................................................................................... 34 2.2.2 data formats in memory ..................................................................................... 34 2.2.3 immediate data format ....................................................................................... 34 2.3 instruction features........................................................................................................ ... 35 2.3.1 risc-type instruction set................................................................................... 35 2.3.2 addressing modes ............................................................................................... 38 2.3.3 instruction format................................................................................................ 41 2.4 instruction set by classification ....................................................................................... 43 2.4.1 instruction set by classification .......................................................................... 43 2.5 processing states........................................................................................................... .... 58 2.5.1 state transitions................................................................................................... 58 section 3 floating-point unit (fpu) .................................................................61 3.1 overview.................................................................................................................... ....... 61 3.2 floating-point registers and floating-point system registers......................................... 62 3.2.1 floating-point register file ................................................................................. 62 3.2.2 floating-point communication register (fpul) ................................................ 62 3.2.3 floating-point status/control register (fpscr)................................................. 62 3.3 floating-point format ....................................................................................................... 65 3.3.1 floating-point format.......................................................................................... 65 3.3.2 non-numbers (nan) ........................................................................................... 66 3.3.3 denormalized number values............................................................................. 66
rev. 3.0, 09/04, page xxii of xxxviii 3.3.4 other special values............................................................................................ 67 3.4 floating-point exception model ....................................................................................... 68 3.4.1 enable state exceptions....................................................................................... 68 3.4.2 disable state exceptions...................................................................................... 68 3.4.3 fpu exception event and code........................................................................... 68 3.4.4 floating-point data arrangement in memory ..................................................... 68 3.4.5 arithmetic operations involving special operands ............................................ 68 3.5 synchronization with cpu................................................................................................ 69 3.6 usage notes ................................................................................................................. ..... 70 section 4 operating modes ...............................................................................71 4.1 operating mode selection ................................................................................................ 71 section 5 clock pulse generator (cpg)............................................................73 5.1 overview.................................................................................................................... ....... 73 5.1.1 block diagram..................................................................................................... 73 5.1.2 pin configuration................................................................................................. 74 5.1.3 related register ................................................................................................... 74 5.2 frequency ranges and clock selection ............................................................................ 74 5.2.1 frequency ranges................................................................................................ 74 5.2.2 clock selection .................................................................................................... 75 5.2.3 notes on register access..................................................................................... 76 5.3 clock source................................................................................................................ ..... 77 5.3.1 connecting a crystal oscillator ........................................................................... 77 5.3.2 external clock input method............................................................................... 78 5.4 oscillation stop detection function ................................................................................. 79 5.4.1 overview.............................................................................................................. 79 5.4.2 settings of oscillation stop detection function .................................................. 79 5.4.3 related register ................................................................................................... 81 5.4.4 precautions for performing oscillation stop detection function........................ 81 5.5 usage notes ................................................................................................................. ..... 82 section 6 exception processing.........................................................................85 6.1 overview.................................................................................................................... ....... 85 6.1.1 types of exception processing and priority ........................................................ 85 6.1.2 exception processing operations......................................................................... 86 6.1.3 exception processing vector table ..................................................................... 87 6.2 resets ...................................................................................................................... .......... 90 6.2.1 types of reset ..................................................................................................... 90 6.2.2 power-on reset ................................................................................................... 90 6.2.3 manual reset ....................................................................................................... 91 6.3 address errors .............................................................................................................. .... 92 6.3.1 address error sources ......................................................................................... 92
rev. 3.0, 09/04, page xxiii of xxxviii 6.3.2 address error exception processing.................................................................... 93 6.4 interrupts .................................................................................................................. ......... 93 6.4.1 interrupt sources.................................................................................................. 93 6.4.2 interrupt priority level ........................................................................................ 94 6.4.3 interrupt exception processing ............................................................................ 94 6.5 exceptions triggered by instructions ............................................................................... 95 6.5.1 types of exceptions triggered by instructions ................................................... 95 6.5.2 trap instructions .................................................................................................. 95 6.5.3 illegal slot instructions ........................................................................................ 96 6.5.4 general illegal instructions.................................................................................. 96 6.5.5 floating-point instructions................................................................................... 96 6.6 when exception sources are not accepted .................................................................... 97 6.7 stack status after exception processing ends .................................................................. 98 6.8 usage notes ................................................................................................................. ..... 99 6.8.1 value of stack pointer (sp) ................................................................................. 99 6.8.2 value of vector base register (vbr) ................................................................. 99 6.8.3 address errors caused by stacking of address error exception processing...... 99 section 7 interrupt controller (intc) ...............................................................101 7.1 overview.................................................................................................................... ....... 101 7.1.1 features................................................................................................................ 10 1 7.1.2 block diagram..................................................................................................... 102 7.1.3 pin configuration................................................................................................. 103 7.1.4 register configuration......................................................................................... 103 7.2 interrupt sources........................................................................................................... .... 104 7.2.1 nmi interrupts ..................................................................................................... 104 7.2.2 user break interrupt ............................................................................................ 104 7.2.3 h-udi interrupt ................................................................................................... 104 7.2.4 irq interrupts ...................................................................................................... 104 7.2.5 on-chip peripheral module interrupts ................................................................ 105 7.2.6 interrupt exception vectors and priority rankings ............................................. 106 7.3 description of registers.................................................................................................... 115 7.3.1 interrupt priority registers a ? l (ipra ? iprl) ................................................... 115 7.3.2 interrupt control register (icr).......................................................................... 117 7.3.3 irq status register (isr).................................................................................... 118 7.4 interrupt operation......................................................................................................... ... 119 7.4.1 interrupt sequence ............................................................................................... 119 7.4.2 stack after interrupt exception processing .......................................................... 121 7.5 interrupt response time................................................................................................... 12 2 7.6 data transfer with interrupt request signals ................................................................... 124 7.6.1 handling cpu interrupt sources, but not dmac activating sources ............... 124 7.6.2 handling dmac activating sources but not cpu interrupt sources ................ 124
rev. 3.0, 09/04, page xxiv of xxxviii section 8 user break controller (ubc)............................................................125 8.1 overview.................................................................................................................... ....... 125 8.1.1 features................................................................................................................ 12 5 8.1.2 block diagram..................................................................................................... 126 8.1.3 register configuration......................................................................................... 127 8.2 register descriptions ....................................................................................................... . 127 8.2.1 user break address register (ubar) ................................................................ 127 8.2.2 user break address mask register (ubamr) ................................................... 128 8.2.3 user break bus cycle register (ubbr) ............................................................. 130 8.2.4 user break control register (ubcr).................................................................. 132 8.3 operation ................................................................................................................... ....... 133 8.3.1 flow of the user break operation ....................................................................... 133 8.3.2 break on on-chip memory instruction fetch cycle ........................................... 135 8.3.3 program counter (pc) values saved................................................................... 135 8.4 examples of use ............................................................................................................. .. 135 8.4.1 break on cpu instruction fetch cycle................................................................ 135 8.4.2 break on cpu data access cycle ....................................................................... 136 8.4.3 break on dma cycle .......................................................................................... 137 8.5 usage notes ................................................................................................................. ..... 138 8.5.1 simultaneous fetching of two instructions ........................................................ 138 8.5.2 instruction fetches at branches ........................................................................... 138 8.5.3 contention between user break and exception processing ................................ 139 8.5.4 break at non-delay branch instruction jump destination.................................. 139 8.5.5 user break trigger output .................................................................................. 139 8.5.6 module standby................................................................................................... 140 8.5.7 internal clock ( ubctrg pulse width ................... 140 section 9 bus state controller (bsc) ...............................................................141 9.1 overview.................................................................................................................... ....... 141 9.1.1 features................................................................................................................ 14 1 9.1.2 block diagram..................................................................................................... 142 9.1.3 pin configuration................................................................................................. 143 9.1.4 register configuration......................................................................................... 143 9.1.5 address map ........................................................................................................ 144 9.2 description of registers.................................................................................................... 146 9.2.1 bus control register 1 (bcr1) ........................................................................... 146 9.2.2 bus control register 2 (bcr2) ........................................................................... 148 9.2.3 wait control register (wcr).............................................................................. 151 9.2.4 ram emulation register (ramer)................................................................... 152 9.3 accessing external space ................................................................................................. 154 9.3.1 basic timing........................................................................................................ 154 9.3.2 wait state control................................................................................................ 155 9.3.3 cs assert period extension ................................................................................. 157
rev. 3.0, 09/04, page xxv of xxxviii 9.4 waits between access cycles ........................................................................................... 158 9.4.1 prevention of data bus conflicts......................................................................... 158 9.4.2 simplification of bus cycle start detection ........................................................ 159 9.5 bus arbitration............................................................................................................. ..... 160 9.6 memory connection examples......................................................................................... 161 section 10 direct memory access controller (dmac) ...................................163 10.1 overview................................................................................................................... ........ 163 10.1.1 features................................................................................................................ 1 63 10.1.2 block diagram..................................................................................................... 165 10.1.3 register configuration......................................................................................... 166 10.2 register descriptions ...................................................................................................... .. 167 10.2.1 dma source address registers 0 ? 3 (sar0 ? sar3) .......................................... 167 10.2.2 dma destination address registers 0 ? 3 (dar0 ? dar3).................................. 168 10.2.3 dma transfer count registers 0 ? 3 (dmatcr0 ? dmatcr3)......................... 169 10.2.4 dma channel control registers 0 ? 3 (chcr0 ? chcr3)................................... 170 10.2.5 dmac operation register (dmaor) ................................................................ 175 10.3 operation .................................................................................................................. ........ 177 10.3.1 dma transfer flow ............................................................................................ 177 10.3.2 dma transfer requests ...................................................................................... 179 10.3.3 channel priority................................................................................................... 182 10.3.4 dma transfer types........................................................................................... 182 10.3.5 dual address mode ............................................................................................. 183 10.3.6 bus modes ........................................................................................................... 189 10.3.7 relationship between request modes and bus modes by dma transfer category ................................................................................. 190 10.3.8 bus mode and channel priorities ........................................................................ 191 10.3.9 source address reload function......................................................................... 191 10.3.10 dma transfer ending conditions....................................................................... 192 10.3.11 dmac access from cpu.................................................................................... 193 10.4 examples of use ............................................................................................................ ... 194 10.4.1 example of dma transfer between on-chip sci and external memory .......... 194 10.4.2 example of dma transfer between a/d converter and on-chip memory (address reload on)............................................................................................ 194 10.4.3 example of dma transfer between external memory and sci1 transmitting side (indirect address on).............................................. 196 10.5 usage notes ................................................................................................................ ...... 198 section 11 advanced timer unit-ii (atu-ii)...................................................199 11.1 overview................................................................................................................... ........ 199 11.1.1 features................................................................................................................ 1 99 11.1.2 pin configuration................................................................................................. 204 11.1.3 register configuration......................................................................................... 208
rev. 3.0, 09/04, page xxvi of xxxviii 11.1.4 block diagrams ................................................................................................... 218 11.1.5 inter-channel and inter-module signal communication diagram...................... 228 11.1.6 prescaler diagram................................................................................................ 229 11.2 register descriptions ...................................................................................................... .. 230 11.2.1 timer start registers (tstr) .............................................................................. 230 11.2.2 prescaler registers (pscr).................................................................................. 234 11.2.3 timer control registers (tcr) ........................................................................... 235 11.2.4 timer i/o control registers (tior).................................................................... 244 11.2.5 timer status registers (tsr) .............................................................................. 256 11.2.6 timer interrupt enable registers (tier) ............................................................ 285 11.2.7 interval interrupt request registers (itvrr) ..................................................... 306 11.2.8 trigger mode register (trgmdr) .................................................................... 311 11.2.9 timer mode register (tmdr) ............................................................................ 312 11.2.10 pwm mode register (pmdr) ............................................................................ 313 11.2.11 down-count start register (dstr) .................................................................... 315 11.2.12 timer connection register (tcnr).................................................................... 322 11.2.13 one-shot pulse terminate register (otr) ......................................................... 327 11.2.14 reload enable register (rldenr) .................................................................... 331 11.2.15 free-running counters (tcnt).......................................................................... 332 11.2.16 down-counters (dcnt) ..................................................................................... 334 11.2.17 event counters (ecnt)...................................................................................... 336 11.2.18 output compare registers (ocr) ....................................................................... 336 11.2.19 input capture registers (icr) ............................................................................. 337 11.2.20 general registers (gr)........................................................................................ 338 11.2.21 offset base registers (osbr) ............................................................................. 341 11.2.22 cycle registers (cylr) ...................................................................................... 341 11.2.23 buffer registers (bfr) ........................................................................................ 342 11.2.24 duty registers (dtr) .......................................................................................... 343 11.2.25 reload register (rldr)...................................................................................... 344 11.2.26 channel 10 registers ........................................................................................... 344 11.3 operation .................................................................................................................. ........ 360 11.3.1 overview.............................................................................................................. 360 11.3.2 free-running counter operation and cyclic counter operation........................ 367 11.3.3 compare-match function .................................................................................... 368 11.3.4 input capture function ........................................................................................ 369 11.3.5 one-shot pulse function ..................................................................................... 370 11.3.6 offset one-shot pulse function and output cutoff function ............................. 371 11.3.7 interval timer operation ..................................................................................... 372 11.3.8 twin-capture function........................................................................................ 373 11.3.9 pwm timer function .......................................................................................... 374 11.3.10 channel 3 to 5 pwm function ............................................................................ 376 11.3.11 event count function and event cycle measurement ........................................ 378 11.3.12 channel 10 functions .......................................................................................... 379
rev. 3.0, 09/04, page xxvii of xxxviii 11.4 interrupts ................................................................................................................. .......... 388 11.4.1 status flag setting timing................................................................................... 388 11.4.2 status flag clearing............................................................................................. 393 11.5 cpu interface.............................................................................................................. ...... 395 11.5.1 registers requiring 32-bit access ...................................................................... 395 11.5.2 registers permitting 8-bit, 16-bit, or 32-bit access........................................... 397 11.5.3 registers requiring 16-bit access ...................................................................... 398 11.5.4 8-bit or 16-bit accessible registers.................................................................... 399 11.5.5 registers requiring 8-bit access ........................................................................ 400 11.6 sample setup procedures.................................................................................................. 40 0 11.7 usage notes ................................................................................................................ ...... 412 11.8 atu-ii registers and pins ................................................................................................ 42 5 section 12 advanced pulse controller (apc)...................................................427 12.1 overview................................................................................................................... ........ 427 12.1.1 features................................................................................................................ 4 27 12.1.2 block diagram..................................................................................................... 428 12.1.3 pin configuration................................................................................................. 429 12.1.4 register configuration......................................................................................... 429 12.2 register descriptions ...................................................................................................... .. 430 12.2.1 pulse output port control register (popcr)...................................................... 430 12.3 operation .................................................................................................................. ........ 431 12.3.1 overview.............................................................................................................. 431 12.3.2 advanced pulse controller output operation ..................................................... 432 12.4 usage notes ................................................................................................................ ...... 435 section 13 watchdog timer (wdt)..................................................................437 13.1 overview................................................................................................................... ........ 437 13.1.1 features................................................................................................................ 4 37 13.1.2 block diagram..................................................................................................... 438 13.1.3 pin configuration................................................................................................. 438 13.1.4 register configuration......................................................................................... 439 13.2 register descriptions ...................................................................................................... .. 439 13.2.1 timer counter (tcnt)........................................................................................ 439 13.2.2 timer control/status register (tcsr)................................................................ 440 13.2.3 reset control/status register (rstcsr) ............................................................ 442 13.2.4 register access.................................................................................................... 443 13.3 operation .................................................................................................................. ........ 444 13.3.1 watchdog timer mode ........................................................................................ 444 13.3.2 interval timer mode ............................................................................................ 446 13.3.3 timing of setting the overflow flag (ovf) ....................................................... 446 13.3.4 timing of setting the watchdog timer overflow flag (wovf)........................ 447 13.4 usage notes ................................................................................................................ ...... 447
rev. 3.0, 09/04, page xxviii of xxxviii 13.4.1 tcnt write and increment contention .............................................................. 447 13.4.2 changing cks2 to cks0 bit values................................................................... 448 13.4.3 changing between watchdog timer/interval timer modes................................ 448 13.4.4 system reset by wdtovf signal...................................................................... 448 13.4.5 internal reset in watchdog timer mode............................................................. 449 13.4.6 manual reset in watchdog timer ....................................................................... 449 13.4.7 multiplication factor for internal clock signal (
rev. 3.0, 09/04, page xxix of xxxviii 15.2.7 serial status register (ssr) ................................................................................ 476 15.2.8 bit rate register (brr) ...................................................................................... 480 15.2.9 serial direction control register (sdcr)........................................................... 486 15.2.10 inversion of sck pin signal................................................................................ 487 15.3 operation .................................................................................................................. ........ 488 15.3.1 overview.............................................................................................................. 488 15.3.2 operation in asynchronous mode ....................................................................... 490 15.3.3 multiprocessor communication........................................................................... 500 15.3.4 synchronous operation........................................................................................ 507 15.4 sci interrupt sources and the dmac .............................................................................. 515 15.5 usage notes ................................................................................................................ ...... 515 15.5.1 tdr write and tdre flag ................................................................................. 515 15.5.2 simultaneous multiple receive errors ................................................................ 516 15.5.3 break detection and processing (asynchoronous mode only)........................... 516 15.5.4 sending a break signal (asynchoronous mode only) ........................................ 516 15.5.5 receive error flags and transmitter operation (synchronous mode only)....... 517 15.5.6 receive data sampling timing and receive margin in asynchronous mode.... 517 15.5.7 constraints on dmac use .................................................................................. 518 15.5.8 cautions on synchronous external clock mode ................................................. 518 15.5.9 caution on synchronous internal clock mode .................................................... 518 section 16 controller area network-ii (hcan-ii) ..........................................519 16.1 overview................................................................................................................... ........ 519 16.1.1 features................................................................................................................ 5 19 16.2 architecture............................................................................................................... ........ 521 16.2.1 block diagram..................................................................................................... 521 16.2.2 each block function............................................................................................ 522 16.2.3 pin configuration................................................................................................. 523 16.2.4 memory map ....................................................................................................... 523 16.3 mailboxes.................................................................................................................. ........ 526 16.3.1 mailbox configuration......................................................................................... 526 16.3.2 message control field ......................................................................................... 529 16.3.3 message data fields ............................................................................................ 538 16.3.4 local acceptance filter mask (lafm)/tx-trigger time (ttt)........................ 538 16.4 hcan control registers .................................................................................................. 541 16.4.1 register descriptions ........................................................................................... 542 16.4.2 master control register_n (mcr_n) (n = 0, 1)................................................... 542 16.4.3 general status register_n (gsr_n) (n = 0, 1)..................................................... 549 16.4.4 hcan-ii_bit timing configuration register n (hcan-ii_bcr 0_n, hcan-ii_bcr1_n) (n = 0, 1) ............................................................................. 550 16.4.5 interrupt register_n (irr_n) (n = 0, 1) ............................................................... 555 16.4.6 interrupt mask register_n (imr_n) (n = 0, 1) .................................................... 561
rev. 3.0, 09/04, page xxx of xxxviii 16.4.7 transmit error counter_n (tec_n) (n = 0, 1)/ receive error counter_n (rec_n) (n = 0, 1) ............................................................................................... 562 16.5 hcan mailbox registers ................................................................................................. 563 16.5.1 transmit pending request register n (txpr0n, txpr1n) (n = 0, 1) ................ 566 16.5.2 transmit cancel register n (txcr1n, txcr0n) (n = 0, 1) ............................... 569 16.5.3 transmit acknowledge register n (txack1n, txack0n) (n = 0, 1) .............. 571 16.5.4 abort acknowledge register n (aback1n, aback0n) (n = 0, 1)................... 573 16.5.5 data frame receive pending register n (rxpr1n, rxpr0n) (n = 0, 1)............ 574 16.5.6 remote frame receive pending register n (rfpr1n, rfpr0n) (n = 0, 1) ........ 576 16.5.7 mailbox interrupt mask register n (mbimr1n, mbimr0n) (n = 0, 1) ............. 577 16.5.8 unread message status register n (umsr1n, umsr0n) (n = 0, 1) ................... 579 16.6 timer registers ............................................................................................................ ..... 580 16.6.1 timer counter register n (tcntrn) (n = 0, 1) .................................................. 582 16.6.2 timer control register_n (tcr_n) (n = 0, 1) ..................................................... 583 16.6.3 timer status register_n (tsr_n) (n = 0, 1) ........................................................ 586 16.6.4 timer mode register_n (tmr_n) (n = 0, 1) ....................................................... 589 16.6.5 timer drift correction register n (tdcrn) (n = 0, 1)........................................ 590 16.6.6 local offset register n (losrn) (n = 0, 1)......................................................... 590 16.6.7 cycle counter register n (ccrn) (n = 0, 1)........................................................ 591 16.6.8 cycle counter double-buffer register n (ccr_buf n) (n = 0, 1) ....................... 591 16.6.9 cycle maximum register n (cmaxn) (n = 0, 1) ................................................ 593 16.6.10 input capture registers n (icr0_cc n, icr0_buf, icr0_tm n, icr1 n) (n = 0, 1) .............................................................................................................. 593 16.6.11 timer compare match registers n (tcmr0n, tcmr1n, tcmr2n) (n = 0, 1) .............................................................................................................. 595 16.7 operation .................................................................................................................. ........ 597 16.7.1 test mode settings .............................................................................................. 597 16.7.2 hcan settings .................................................................................................... 598 16.7.3 message transmission sequence......................................................................... 599 16.7.4 message transmission cancellation sequence.................................................... 601 16.7.5 message receive sequence ................................................................................. 603 16.7.6 reconfiguration of mailboxes ............................................................................. 604 16.7.7 list of registers ................................................................................................... 606 16.7.8 interrupt sources.................................................................................................. 607 16.7.9 dmac interface .................................................................................................. 608 16.7.10 hcan-ii port settings......................................................................................... 609 16.7.11 can bus interface............................................................................................... 610 16.8 usage notes ................................................................................................................ ...... 611 16.8.1 txpr setting during reception .......................................................................... 611 16.8.2 transmit cancellation setting immediately after transmission setting in bus idle............................................................................................................ 611 16.8.3 failure on transmit cancellation at mailbox 31 ................................................. 612 16.8.4 txpr setting during transmission ..................................................................... 612
rev. 3.0, 09/04, page xxxi of xxxviii 16.8.5 time triggered transmission setting/timer operation disabled....................... 614 16.8.6 mailbox access in hcan sleep mode ............................................................... 614 16.8.7 notes on port settings for 64-buffer hcan-ii with one channel ..................... 616 section 17 a/d converter..................................................................................617 17.1 overview................................................................................................................... ........ 617 17.1.1 features................................................................................................................ 6 17 17.1.2 block diagram..................................................................................................... 618 17.1.3 pin configuration................................................................................................. 620 17.1.4 register configuration......................................................................................... 623 17.2 register descriptions ...................................................................................................... .. 625 17.2.1 a/d data registers 0 to 31 (addr0 to addr31) ............................................. 625 17.2.2 a/d control/status registers 0 and 1 (adcsr0, adcsr1) .............................. 626 17.2.3 a/d control registers 0 to 2 (adcr0 to adcr2)............................................. 631 17.2.4 a/d control/status register 2 (adcsr2)........................................................... 633 17.2.5 a/d trigger registers 0 to 2 (adtrgr0 to adtrgr2) .................................. 636 17.3 cpu interface.............................................................................................................. ...... 637 17.4 operation .................................................................................................................. ........ 638 17.4.1 single mode......................................................................................................... 638 17.4.2 scan mode ........................................................................................................... 640 17.4.3 analog input sampling and a/d conversion time............................................. 644 17.4.4 external triggering of a/d conversion .............................................................. 646 17.4.5 a/d converter activation by atu-ii.................................................................. 647 17.4.6 adend output pin ............................................................................................. 647 17.5 interrupt sources and dma transfer requests ................................................................ 648 17.6 usage notes ................................................................................................................ ...... 648 17.6.1 a/d conversion accuracy definitions ................................................................... 649 section 18 multi-trigger a/d converter (mtad) ...........................................651 18.1 overview................................................................................................................... ........ 651 18.1.1 feature ................................................................................................................. 6 51 18.1.2 block diagram..................................................................................................... 651 18.1.3 input/output pins ................................................................................................. 653 18.1.4 register configuration......................................................................................... 653 18.2 register descriptions ...................................................................................................... .. 655 18.2.1 a/d trigger control registers 0 and 1 (adtcr0 and adtcr1)...................... 655 18.2.2 a/d trigger status registers 0 and 1 (adtsr0 and adtsr1) ......................... 657 18.2.3 a/d trigger interrupt enable registers 0 and 1 (adtier0 and adtier1)...... 660 18.2.4 a/d free-running counters (adcnt0 and adcnt1) ..................................... 663 18.2.5 a/d general registers a and b (adgr0a, adgr0b, adgr1a, and adgr1b) ..................................................................................................... 664 18.2.6 a/d cycle registers 0 and 1 (adcylr0 and adcylr1)................................ 664
rev. 3.0, 09/04, page xxxii of xxxviii 18.2.7 a/d duty registers a and b (addr0a, addr0b, addr1a, and addr1b) ..................................................................................................... 665 18.3 interrupt interface ........................................................................................................ ..... 666 18.3.1 on-chip peripheral module interrupts ................................................................ 666 18.3.2 interrupt exception vectors and priority rankings ............................................. 666 18.3.3 interrupt priority registers a ? l (ipra ? iprl) ................................................... 675 18.4 pfc and i/o port interfaces .............................................................................................. 67 7 18.4.1 pfc interface ....................................................................................................... 677 18.4.2 port a control registers h and l (pacrh, pacrl) ........................................ 677 18.4.3 i/o port a............................................................................................................. 68 1 18.5 operation .................................................................................................................. ........ 682 18.5.1 overview.............................................................................................................. 682 18.5.2 pwm operation ................................................................................................... 683 18.5.3 compare match operation................................................................................... 683 18.5.4 multi-trigger a/d conversion operation ........................................................... 683 18.5.5 interrupts.............................................................................................................. 6 88 18.5.6 usage notes ......................................................................................................... 689 18.5.7 operation waveform examples........................................................................... 689 18.6 appendices................................................................................................................. ....... 692 18.6.1 on-chip peripheral module registers ................................................................. 692 18.6.2 pin states.............................................................................................................. 6 93 18.6.3 ac characteristics ............................................................................................... 693 section 19 high-performance user debug interface (h-udi) ........................695 19.1 overview................................................................................................................... ........ 695 19.1.1 features................................................................................................................ 6 95 19.1.2 h-udi block diagram......................................................................................... 696 19.1.3 pin configuration................................................................................................. 697 19.1.4 register configuration......................................................................................... 697 19.2 external signals ........................................................................................................... ..... 698 19.2.1 test clock (tck) ................................................................................................ 698 19.2.2 test mode select (tms)...................................................................................... 698 19.2.3 test data input (tdi) .......................................................................................... 698 19.2.4 test data output (tdo) ...................................................................................... 698 19.2.5 test reset ( trst ) ............................................................................................... 699 19.3 register descriptions ...................................................................................................... .. 699 19.3.1 instruction register (sdir) ................................................................................. 699 19.3.2 status register (sdsr)........................................................................................ 701 19.3.3 data register (sddr) ......................................................................................... 702 19.3.4 bypass register (sdbpr) ................................................................................... 702 19.3.5 boundary scan register (sdbsr)......................................................................... 702 19.3.6 id code register (sdidr) .................................................................................... 719 19.4 operation .................................................................................................................. ........ 720
rev. 3.0, 09/04, page xxxiii of xxxviii 19.4.1 tap controller .................................................................................................... 720 19.4.2 h-udi interrupt and serial transfer.................................................................... 721 19.4.3 h-udi reset ........................................................................................................ 724 19.5 boundary scan .............................................................................................................. .... 724 19.5.1 supported instructions ......................................................................................... 724 19.5.2 notes on use........................................................................................................ 725 19.6 usage notes ................................................................................................................ ...... 726 section 20 advanced user debugger (aud)....................................................729 20.1 overview................................................................................................................... ........ 729 20.1.1 features................................................................................................................ 7 29 20.1.2 block diagram..................................................................................................... 730 20.2 pin configuration.......................................................................................................... .... 730 20.2.1 pin descriptions ................................................................................................... 731 20.3 branch trace mode.......................................................................................................... . 733 20.3.1 overview.............................................................................................................. 733 20.3.2 operation ............................................................................................................. 733 20.4 ram monitor mode ......................................................................................................... 73 5 20.4.1 overview.............................................................................................................. 735 20.4.2 communication protocol ..................................................................................... 735 20.4.3 operation ............................................................................................................. 736 20.5 usage notes ................................................................................................................ ...... 737 20.5.1 initialization ......................................................................................................... 73 7 20.5.2 operation in software standby mode.................................................................. 737 section 21 pin function controller (pfc).........................................................739 21.1 overview................................................................................................................... ........ 739 21.2 register configuration..................................................................................................... . 744 21.3 register descriptions ...................................................................................................... .. 745 21.3.1 port a io register (paior)................................................................................ 745 21.3.2 port a control registers h and l (pacrh, pacrl) ........................................ 746 21.3.3 port b io register (pbior) ................................................................................ 750 21.3.4 port b control registers h and l (pbcrh, pbcrl) ......................................... 751 21.3.5 port b invert register (pbir).............................................................................. 756 21.3.6 port c io register (pcior) ................................................................................ 757 21.3.7 port c control register (pccr) .......................................................................... 758 21.3.8 port d io register (pdior)................................................................................ 759 21.3.9 port d control registers h and l (pdcrh, pdcrl) ........................................ 760 21.3.10 port e io register (peior)................................................................................. 764 21.3.11 port e control register (pecr) .......................................................................... 765 21.3.12 port f io register (pfior) ................................................................................. 770 21.3.13 port f control registers h and l (pfcrh, pfcrl) .......................................... 771 21.3.14 port g io register (pgior)................................................................................ 776
rev. 3.0, 09/04, page xxxiv of xxxviii 21.3.15 port g control register (pgcr).......................................................................... 777 21.3.16 port h io register (phior)................................................................................ 778 21.3.17 port h control register (phcr).......................................................................... 779 21.3.18 port j io register (pjior)................................................................................... 785 21.3.19 port j control registers h and l (pjcrh, pjcrl) ............................................ 786 21.3.20 port k io register (pkior)................................................................................ 790 21.3.21 port k control registers h and l (pkcrh, pkcrl) ........................................ 790 21.3.22 port k invert register (pkir) ............................................................................. 795 21.3.23 port l io register (plior)................................................................................. 796 21.3.24 port l control registers h and l (plcrh, plcrl).......................................... 797 21.3.25 port l invert register (plir) .............................................................................. 801 section 22 i/o ports (i/o)..................................................................................803 22.1 overview................................................................................................................... ........ 803 22.2 port a..................................................................................................................... ........... 803 22.2.1 register configuration......................................................................................... 804 22.2.2 port a data register (padr).............................................................................. 804 22.2.3 port a port register (papr) ............................................................................... 805 22.3 port b ..................................................................................................................... ........... 806 22.3.1 register configuration......................................................................................... 806 22.3.2 port b data register (pbdr) .............................................................................. 807 22.3.3 port b port register (pbpr)................................................................................ 808 22.4 port c ..................................................................................................................... ........... 808 22.4.1 register configuration......................................................................................... 808 22.4.2 port c data register (pcdr) .............................................................................. 809 22.5 port d..................................................................................................................... ........... 810 22.5.1 register configuration......................................................................................... 810 22.5.2 port d data register (pddr).............................................................................. 811 22.5.3 port d port register (pdpr) ............................................................................... 812 22.6 port e ..................................................................................................................... ........... 813 22.6.1 register configuration......................................................................................... 813 22.6.2 port e data register (pedr)............................................................................... 814 22.7 port f..................................................................................................................... ............ 816 22.7.1 register configuration......................................................................................... 816 22.7.2 port f data register (pfdr) ............................................................................... 817 22.8 port g..................................................................................................................... ........... 818 22.8.1 register configuration......................................................................................... 819 22.8.2 port g data register (pgdr).............................................................................. 819 22.9 port h..................................................................................................................... ........... 821 22.9.1 register configuration......................................................................................... 822 22.9.2 port h data register (phdr).............................................................................. 822 22.10 port j .................................................................................................................... ............. 823 22.10.1 register configuration......................................................................................... 824
rev. 3.0, 09/04, page xxxv of xxxviii 22.10.2 port j data register (pjdr)................................................................................. 824 22.10.3 port j port register (pjpr) .................................................................................. 825 22.11 port k.................................................................................................................... ............ 826 22.11.1 register configuration......................................................................................... 826 22.11.2 port k data register (pkdr).............................................................................. 827 22.12 port l .................................................................................................................... ............ 828 22.12.1 register configuration......................................................................................... 828 22.12.2 port l data register (pldr)............................................................................... 829 22.12.3 port l port register (plpr) ................................................................................ 830 22.13 pod (port output disable) control.................................................................................. 831 section 23 rom ................................................................................................833 23.1 features ................................................................................................................... .......... 833 23.2 overview................................................................................................................... ........ 835 23.2.1 block diagram..................................................................................................... 835 23.2.2 operating mode ................................................................................................... 836 23.2.3 mode comparison................................................................................................ 838 23.2.4 flash memory configuration............................................................................... 839 23.2.5 block division ..................................................................................................... 840 23.2.6 programming/erasing interface ........................................................................... 841 23.3 pin configuration.......................................................................................................... .... 843 23.4 register configuration..................................................................................................... . 843 23.4.1 registers............................................................................................................... 8 43 23.4.2 programming/erasing interface registers ........................................................... 846 23.4.3 programming/erasing interface parameters ........................................................ 851 23.4.4 ram emulation register (ramer)................................................................... 862 23.5 on-board programming mode ......................................................................................... 864 23.5.1 boot mode ........................................................................................................... 864 23.5.2 user program mode............................................................................................. 868 23.5.3 user boot mode................................................................................................... 878 23.6 protection ................................................................................................................. ......... 881 23.6.1 hardware protection ............................................................................................ 881 23.6.2 software protection.............................................................................................. 882 23.6.3 error protection.................................................................................................... 883 23.7 flash memory emulation in ram ................................................................................... 885 23.8 usage notes ................................................................................................................ ...... 888 23.8.1 switching between user mat and user boot mat........................................... 888 23.8.2 interrupts during programming/erasing .............................................................. 889 23.8.3 other notes .......................................................................................................... 893 23.9 programmer mode ............................................................................................................ 894 23.9.1 pin arrangement of socket adapter .................................................................... 895 23.9.2 programmer mode operation .............................................................................. 897 23.9.3 memory-read mode............................................................................................ 898
rev. 3.0, 09/04, page xxxvi of xxxviii 23.9.4 auto-program mode ............................................................................................ 899 23.9.5 auto-erase mode................................................................................................. 899 23.9.6 status-read mode................................................................................................ 900 23.9.7 status polling ....................................................................................................... 900 23.9.8 time taken in transition to programmer mode ................................................. 901 23.9.9 notes on programming in programmer mode ..................................................... 901 23.10 further information....................................................................................................... .... 901 23.10.1 serial communication interface specification for boot mode............................ 901 23.10.2 ac characteristics and timing in programmer mode......................................... 927 23.10.3 storable area for procedure program and programming data .......................... 933 section 24 ram ................................................................................................941 24.1 overview................................................................................................................... ........ 941 24.2 operation .................................................................................................................. ........ 942 section 25 power-down state...........................................................................943 25.1 overview................................................................................................................... ........ 943 25.1.1 power-down states.............................................................................................. 943 25.1.2 pin configuration................................................................................................. 945 25.1.3 related registers ................................................................................................. 945 25.2 register descriptions ...................................................................................................... .. 945 25.2.1 standby control register (sbycr) .................................................................... 945 25.2.2 system control register 1 (syscr1) ................................................................. 946 25.2.3 system control register 2 (syscr2) ................................................................. 947 25.2.4 notes on register access..................................................................................... 949 25.3 hardware standby mode .................................................................................................. 949 25.3.1 transition to hardware standby mode ................................................................ 949 25.3.2 canceling hardware standby mode .................................................................... 949 25.3.3 hardware standby mode timing......................................................................... 950 25.4 software standby mode.................................................................................................... 95 0 25.4.1 transition to software standby mode ................................................................. 950 25.4.2 canceling software standby mode...................................................................... 950 25.4.3 software standby mode application example.................................................... 952 25.5 sleep mode ................................................................................................................. ...... 953 25.5.1 transition to sleep mode..................................................................................... 953 25.5.2 canceling sleep mode ......................................................................................... 953 section 26 reliability ........................................................................................955 26.1 reliability................................................................................................................ .......... 955 section 27 electrical characteristics .................................................................957 27.1 absolute maximum ratings ............................................................................................. 957 27.2 dc characteristics ......................................................................................................... ... 959
rev. 3.0, 09/04, page xxxvii of xxxviii 27.3 ac characteristics ......................................................................................................... ... 975 27.3.1 timing for swicthing the power supply on/off .................................................... 975 27.3.2 clock timing ........................................................................................................ 976 27.3.3 control signal timing ......................................................................................... 978 27.3.4 bus timing .......................................................................................................... 982 27.3.5 advanced timer unit timing and advance pulse controller timing ................ 986 27.3.6 i/o port timing.................................................................................................... 987 27.3.7 watchdog timer timing...................................................................................... 988 27.3.8 serial communication interface timing.............................................................. 989 27.3.9 hcan timing ..................................................................................................... 991 27.3.10 a/d converter timing......................................................................................... 992 27.3.11 h-udi timing ..................................................................................................... 994 27.3.12 aud timing ........................................................................................................ 996 27.3.13 ubc trigger timing............................................................................................ 998 27.3.14 measuring conditions for ac characteristics ..................................................... 999 27.4 a/d converter characteristics ........................................................................................ 1000 27.5 flash memory characteristics......................................................................................... 1001 27.6 usage note................................................................................................................. ..... 1002 27.6.1 notes on connecting external capacitor for current stabilization ................... 1002 27.6.2 notes on mode pin input ................................................................................... 1002 appendix a on-chip peripheral module registers.........................................1005 a.1 address ..................................................................................................................... ...... 1005 a.2 register states in reset and power-down states ........................................................... 1073 appendix b pin states ....................................................................................1079 appendix c product lineup ...........................................................................1083 appendix d package dimensions ..................................................................1085
rev. 3.0, 09/04, page xxxviii of xxxviii
rev. 3.0, 09/04, page 1 of 1086 section 1 overview 1.1 features the sh7058 is a single-chip risc microcontroller that integrates a risc cpu core using an original renesas architecture with peripheral functions required for system configuration. the cpu has a risc-type instruction set. basic instructions can be executed in one state (one system clock cycle), which greatly improves instruction execution speed. in addition, the 32-bit internal architecture enhances data processing power. with this cpu, it has become possible to assemble low-cost, high-performance/high-functionality systems even for applications such as real-time control, which could not previously be handled by microcontrollers because of their high-speed processing requirements. in addition, the sh7058 includes on-chip peripheral functions necessary for system configuration, such as a floating-point unit (fpu) , rom , ram, a direct memory access controller (dmac), timers, a serial communication interface (sci), controller area network-ii (hcan-ii), a/d converter, interrupt controller (intc), and i/o ports. rom and sram can be directly connected by means of an external memory access support function, greatly reducing system cost. on-chip rom is available as flash memory in the f-ztat?* (flexible zero turn around time) version. the flash memory can be programmed with a programmer that supports sh7058 programming, and can also be programmed and erased by software. since the programming/erasing control program is included as firmware, programming and erasing can be performed by calling this program with a user program. this enables the chip to be programmed by the user while mounted on a board. the features of the sh7058 are summarized in table 1.1. note : * f-ztat is a trademark of renesas technology, corp.
rev. 3.0, 09/04, page 2 of 1086 table 1.1 sh7058 features item features cpu ? maximum operating frequency: 80 mhz ? original renesas sh-2e cpu ? 32-bit internal architecture ? general register machine ? sixteen 32-bit general registers ? three 32-bit control registers ? four 32-bit system registers ? instruction execution time: basic instructions execute in one state (12.5 ns/instruction at 80 mhz operation) ? address space: architecture supports 4 gbytes ? five-stage pipeline operating states ? operating modes ? single-chip mode ? 8/16-bit bus expanded mode ? mode with on-chip rom  mode with no on-chip rom ? processing states ? reset state ? program execution state ? exception handling state ? bus-released state ? power-down state ? power-down state ? sleep mode ? software standby mode ? hardware standby mode ? module standby multiplier ? 32 32 64 multiply operations executed in two to four cycles 32 32 + 64 64 multiply-and-accumulate operations executed in two to four cycles
rev. 3.0, 09/04, page 3 of 1086 table 1.1 sh7058 features (cont) item features floating-point unit (fpu) ? superh architecture coprocessor ? supports single-precision floating-point operations ? supports a subset of the data types specified by the ieee standard ? supports invalid operation and division-by-zero exception detection (subset of ieee standard) ? supports round to zero as the rounding mode (subset of ieee standard) ? sixteen 32-bit floating-point data registers ? supports the fmac instruction (multiply-and-accumulate instruction) ? supports the fdiv instruction (divide instruction) ? supports the fldi0/fldi1 instructions (constant 0/1 load instructions) ? instruction delay time: two cycles for each of fmac, fadd, fsub, and fmul instructions ? execution pitch: one cycle for each of fmac, fadd, fsub, and fmul instructions clock pulse generator (cpg/pll) ? on-chip clock pulse generator (maximum operating frequency: 80 mhz) ? independent generation of cpu system clock and peripheral clock for peripheral modules ? on-chip clock-multiplication pll circuit ( 4, 8) ? internal clock frequency range: 5 to 10 mhz interrupt controller (intc) ? nine external interrupt pins (nmi, irq0 to irq7 ) ? 117 internal interrupt sources (atu-ii 75, sci 20, dmac 4, a/d 5, wdt 1, ubc 1, cmt 2, hcan-ii 8, h-udi 1) ? 16 programmable priority levels user break controller (ubc) ? requests an interrupt when the cpu or dmac generates a bus cycle with specified conditions (interrupt can also be masked) ? trigger pulse output (ubctrg) on break condition ? selection of trigger pulse width ( 1, 4, 8, 16) ? simplifies configuration of an on-chip debugger
rev. 3.0, 09/04, page 4 of 1086 table 1.1 sh7058 features (cont) item features bus state controller (bsc) ? supports external memory access (sram and rom directly connectable) ? 8/16-bit bus space ? 3.3 v bus interface ? 16 mb address space divided into four areas, with the following parameters settable for each area: ? bus size (8 or 16 bits) ? number of wait cycles ? chip select signals ( cs0 to cs3 ) output for each area ? wait cycles can be inserted using an external wait signal ? external access in minimum of two cycles ? provision for idle cycle insertion to prevent bus collisions direct memory access controller (dmac) (4 channels) ? dma transfer possible for the following devices: ? external memory, on-chip memory, on-chip peripheral modules (excluding dmac, ubc, bsc) ? dma transfer requests by on-chip modules ? sci, a/d converter, atu-ii, hcan-ii ? cycle steal or burst mode transfer ? dual address mode ? direct transfer mode ? indirect transfer mode (channel 3 only) ? address reload function (channel 2 only) ? transfer data width: byte/word/longword advanced timer unit-ii (atu-ii) ? maximum 65 inputs or outputs can be processed ? four 32-bit input capture inputs ? thirty 16-bit input capture inputs/output compare outputs ? sixteen 16-bit one-shot pulse outputs ? eight 16-bit pwm outputs ? six 8-bit event counters ? one gap detection function ? i/o pin output inversion function advanced pulse controller (apc) ? maximum eight pulse outputs on reception of atu-ii (channel 11) compare-match signal
rev. 3.0, 09/04, page 5 of 1086 table 1.1 sh7058 features (cont) item features watchdog timer (wdt) (1 channel) ? can be switched between watchdog timer and interval timer function ? internal reset, external signal, or interrupt generated by counter overflow ? two kinds of internal reset ? power-on reset ? manual reset compare-match timer (cmt) (2 channels) ? selection of 4 counter input clocks ? a compare-match interrupt can be requested independently for each channel serial communication interface (sci) (5 channels) ? selection of asynchronous or synchronous mode ? simultaneous transmission/reception (full-duplex) capability ? serial data communication possible between multiple processors (asynchronous mode) ? clock inversion function ? lsb-/msb-first selection function for transmission controller area network-ii (hcan-ii) (2 channels) ? can version: bosch 2.0b active compatible ? buffer size (per channel): transmit/receive 31, receive-only 1 ? receive message filtering capability a/d converter ? thirty-two channels ? three sample-and-hold circuits ? independent operation of 12 channels 2 and 8 channels 1 ? selection of two conversion modes ? single conversion mode ? scan mode  continuous scan mode  single-cycle scan mode ? can be activated by external trigger or atu-ii compare-match ? 10-bit resolution ? accuracy: 2 lsb multi-trigger a/d (mtad) ? while performing conversion on the specified channels in scan mode, a/d conversion on the channels for which conversion has been requested can be performed prior to the other channels when a compare match occurs with respect to the timer in the a/d converter
rev. 3.0, 09/04, page 6 of 1086 table 1.1 sh7058 features (cont) item features high-performance user debug interface (h-udi) ? compliant with ieee1149.1 ? five test signals (tck, tdi, td0, tms, and trst ) ? tap controller ? instruction register ? data register ? bypass register ? test mode compliant with ieee1149.1 ? standard instructions: bypass, sample/preload, extest ? optional instructions: clamp, highz, idcode ? h-udi interrupt ? h-udi interrupt request to intc advanced user debugger (aud) ? eight dedicated pins ? ram monitor mode ? data input/output frequency: 10 mhz or less ? possible to read/write to a module connected to the internal/external bus ? branch address output mode i/o ports (including timer i/o pins, address and data buses) ? dual-function input/output pins: 149 ? schmitt input pins: nmi, irqn , res , hstby , fwe, tclk, ic, ic/oc, sck, adtrg ? input port protection rom ? 1-mb flash memory ? 1-mb divided into 16 blocks ? small blocks: 4 kb 8 ? medium block: 96 kb 1 ? large blocks: 128 kb 7 ? ram emulation function (using 4 kb small block) ? programming/erasing control program included as firmware ? flash memory programming methods ? boot mode ? user program mode ? user boot mode ? programmer mode
rev. 3.0, 09/04, page 7 of 1086 table 1.1 sh7058 features (cont) item features ram ? 48 kb sram 1.2 block diagram rom (flash) 1 mb ram 48 kb dmac (4 channels) sci (5 channels) cmt (2 channels) aud h-udi hcan ii (2 channels) atu-ii a/d converter wdt bsc interrupt controller clock pulse generator port/control signals port port port/address signals pk15/to8p pk14/to8o pk13/to8n pk12/to8m pk11/to8l pk10/to8k pk9/to8j pk8/to8i pk7/to8h pk6/to8g pk5/to8f pk4/to8e pk3/to8d pk2/to8c pk1/to8b pk0/to8a pj15/ti9f pj14/ti9e pj13/ti9d pj12/ti9c pj11/ti9b pj10/ti9a pj9/tio5d pj8/tio5c pj7/tio2h pj6/tio2g pj5/tio2f pj4/tio2e pj3/tio2d pj2/tio2c pj1/tio2b pj0/tio2a ph15/d15 ph14/d14 ph13/d13 ph12/d12 ph11/d11 ph10/d10 ph9/d9 ph8/d8 ph7/d7 ph6/d6 ph5/d5 ph4/d4 ph3/d3 ph2/d2 ph1/d1 ph0/d0 pa0/ti0a pa1/ti0b pa2/ti0c pa3/ti0d pa4/tio3a pa5/tio3b pa6/tio3c pa7/tio3d pa8/tio4a/adto0a pa9/tio4b/adto0b pa10/tio4c/adto1a pa11/tio4d/adto1b pa12/tio5a pa13/tio5b pa14/txd0 pa15/rxd0 pb0/to6a pb1/to6b pb2/to6c pb3/to6d pb4/to7a/to8a pb5/to7b/to8b pb6/to7c/to8c pb7/to7d/to8d pb8/txd3/to8e pb9/rxd3/to8f pb10/txd4/htxd0/to8g pb11/rxd4/hrxd0/to8h pb12/tclka/ ubctrg pb13/sck0 pb14/sck1/tclkb/ti10 pb15/puls5/sck2 pc0/txd1 pc1/rxd1 pc2/txd2 pc3/rxd2 pc4/ irq0 pg0/puls7/hrxd0/hrxd1 pg1/ irq1 pg2/ irq2 /adend pg3/ irq3 / adtrg0 pf15/ breq pf14/ back pf8/ wait pf9/ rd pf7/ wrh pf6/ wrl pf13/ cs3 pf12/ cs2 pf11/ cs1 pf10/ cs0 pf5/a21/ po d pf4/a20 pf3/a19 pf2/a18 pf1/a17 pf0/a16 pe15/a15 pe14/a14 pe13/a13 pe12/a12 pe11/a11 pe10/a10 pe9/a9 pe8/a8 pe7/a7 pe6/a6 pe5/a5 pe4/a4 pe3/a3 pe2/a2 pe1/a1 pe0/a0 pd0/tio1a pd1/tio1b pd2/tio1c pd3/tio1d pd4/tio1e pd5/tio1f pd6/tio1g pd7/tio1h pd8/puls0 pd9/puls1 pd10/puls2 pd11/puls3 pd12/puls4 pd13/puls6/htxd0/htxd1 pl0/ti10 pl1/tio11a/ irq6 pl2/tio11b/ irq7 pl3/tclkb pl4/ adtrg0 pl5/ adtrg1 pl6/adend pl7/sck2 pl8/sck3 pl9/sck4/ irq5 pl10/htxd0/htxd1/htxd0 & htxd1 pl11/hrxd0/hrxd1/hrxd0 & hrxd1 pl12/ irq4 pl13/ irqout ck extal xtal pllv cc pllv ss pllcap vcc ( 8) pvcc1 ( 4) pvcc2 ( 6) v cl ( 3) vss ( 21) avref ( 2) avcc ( 2) avss ( 2) an31 ? 0 audrst audmd audata3 ? 0 audck audsync tms trst tdi tdo tck res hstby fwe md2 md1 md0 nmi wdtovf port/data signals port port : peripheral address bus (9 bits) : peripheral data bus (16 bits) : internal address bus (32 bits) : internal upper data bus (16 bits) : internal lower data bus (16 bits) cpu fpu multiplier figure 1.1 block diagram
rev. 3.0, 09/04, page 8 of 1086 1.3 pin description 1.3.1 pin arrangement pd8/puls0 pd9/puls1 pd10/puls2 pd11/puls3 pd12/puls4 pd13//puls6/htxd0/htxd1 pe0/a0 pe1/a1 pe2/a2 pe3/a3 vcc pe4/a4 vss pe5/a5 pe6/a6 pe7/a7 pe8/a8 pe9/a9 pe10/a10 pvcc1 pe11/a11 vss pe12/a12 pe13/a13 pe14/a14 pe15/a15 pf0/a16 pf1/a17 pf2/a18 v cl pf3/a19 vss pf4/a20 pf5/a21/ pf6/ pf7/ pf8/ pf9/ pvcc1 pf10/ vss pf11/ pf12/ pf13/ pf14/ pf15/ vss ck vcc md2 extal vcc xtal vss md1 fwe md0 pllvcc pllcap pllvss ph0/d0 ph1/d1 ph2/d2 ph3/d3 ph4/d4 ph5/d5 ph6/d6 pvcc1 ph7/d7 vss ph8/d8 ph9/d9 vcc ph10/d10 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 pk7/to8h vcc pk6/to8g pk5/to8f pk4/to8e pk3/to8d pk2/to8c pk1/to8b vss pk0/to8a pvcc2 pj15/ti9f pj14/ti9e pj13/ti9d pj12/ti9c pj11/ti9b pj10/ti9a vcc pj9/tio5d vss pj8/tio5c pj7/tio2h pj6/tio2g pj5/tio2f pj4/tio2e pj3/tio2d pj2/tio2c pj1/tio2b pj0/tio2a pg3/ / vss pg2/ /adend pvcc2 pg1/ pg0/puls7/hrxd0/hrxd1 pc4/ pc3/rxd2 pc2/txd2 pc1/rxd1 pc0/txd1 pb15/puls5/sck2 vss pb14/sck1/tclkb/ti10 v cl pb13/sck0 pb12/tclka/ pb11/rxd4/hrxd0/to8h pb10/txd4/htxd0/to8g pb9/rxd3/to8f pb8/txd3/to8e pb7/to7d/to8d pb6/to7c/to8c pb5/to7b/to8b pb4/to7a/to8a vss pb3/to6d pvcc2 pb2/to6c pb1/to6b pb0/to6a pa15/rxd0 pa14/txd0 pa13/tio5b vss pa12/tio5a vcc pa11/tio4d/adto1b pa10/tio4c/adto1a pa9/tio4b/adto0b pa8/tio4a/adto0a pa7/tio3d pa6/tio3c pa5/tio3b pa4/tio3a pa3/ti0d pa2/ti0c 204 203 202 201 200 199 198 197 196 195 194 193 192 191 190 189 188 187 186 185 184 183 182 181 180 179 178 177 176 175 174 173 172 171 170 169 168 167 166 165 164 163 162 161 160 159 158 157 156 155 154 153 152 151 150 149 148 147 146 145 144 143 142 141 140 139 138 137 136 135 134 133 132 131 130 129 pvcc2 pa1/ti0b vss pa0/ti0a an31 an30 avss avref avcc an29 an28 an27 an26 an25 an24 an23 an22 an21 an20 an19 an18 an17 an16 an15 an14 an13 avcc avref avss an12 an11 an10 an9 an8 an7 an6 an5 an4 an3 an2 an1 an0 vss nmi pvcc1 ph15/d15 ph14/d14 ph13/d13 ph12/d12 ph11/d11 vss 128 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111 110 109 108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 vss pk8/to8i pk9/to8j pk10/to8k pk11/to8l pk12/to8m pk13/to8n pvcc2 pk14/to8o vss pk15/to8p pl0/ti10 pl1/tio11a/ pl2/tio11b/ pl3/tclkb pl4/ pl5/ pl6/adend pl7/sck2 pl8/sck3 v cl pl9/sck4/ vss pl10/htxd0/htxd1/htxd0 & htxd1 pl11/hrxd0/hrxd1/hrxd0 & hrxd1 pl12/ pl13/ tms tdi tdo tck vcc vss audmd audata0 audata1 audata2 audata3 audck pvcc2 pd0/tio1a vss pd1/tio1b pd2/tio1c pd3/tio1d pd4/tio1e pd5/tio1f pd6/tio1g pd7/tio1h 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 fp-256h (top view) index figure 1.2 pin assignments (fp-256h)
rev. 3.0, 09/04, page 9 of 1086 pl8/sck3 pl9/sck4/ irq5 pl11/hrxd0/ hrxd1/ hrxd0&hrxd1 pl10/htxd0/ htxd1/ htxd0&htxd1 pl1/tio11a/ irq6 pl2/tio11b/ irq7 pa9/tio4b/ adto0b pa11/tio4d/ adto1b pb4/to7a/ to8a pb9/rxd3 /to8f pb15/puls5/ sck2 pb5/to7b/ to8b pb10/txd4/ htxd0/to8g pb11/rxd4/ hrxd0/to8h pa8/tio4a/ adto0a pa10/tio4c/ adto1a pb6/to7c /to8c pb8/txd3 /to8e pb12/tclka/ ubctrg pg2/irq2/ adend pb14/sck1/ tclkb/ti10 pg3/irq3/ adtrg0 pg0/puls7/ hrxd0/hrxd1 pd13/puls6/ htxd0/htxd1 ph2/d2 pllvss pllvcc hstby xtal extal ck pf11/cs1 pf10/cs0 pf8/wait vss pf2/a18 pe14/a14 pe11/a11 pe8/a8 pe5/a5 pe3/a3 ph5 /d5 ph4/d4 ph1/d1 pllcap res vss vcc vss pf13/cs3 pf6/wrl pf9/rd vcl pf1/a17 pe13/a13 pe10/a10 pe7/a7 pe4/a4 pe0/a0 pd12/ puls4 pd3/ tio1d 20 19 18 17 16 15 14 13 12 10 11 9 8 7 6 5 4 3 2 1 ph13/d13 ph7/d7 ph3/d3 ph6/d6 md0 md1 md2 pf15/ breq pf12/cs2 pvcc1 pf5/a21/ pod pf4/a20 pf0/a16 pe12/a12 pvcc1 pe6/a6 pe2/a2 pd11/ puls3 pd10/ puls2 pd0/ tio1a ph15/d15 ph12/d12 ph8/d8 ph9/d9 nmi ph14/d14 ph11/d11 ph10/d10 an3 vss pvcc1 vcc an5 an2 an1 vss an8 an7 an4 an0 vss vss vss vss vss vss vss vss vss vss vss vss vss vss vss vss pd8/ puls0 pd7/ tio1h pd2/ tio1c au data 3 pd6/ tio1g pd5/ tio1f audsync au data 1 pd1/ tio1b vss au data 2 au data 0 pvcc2 audmd audrst tdo vss vcc tck trst tdi tms pl12/ irq4 pl13/ irqout pl4/ adtrg0 pl7/sck2 vcl vss pl0/ti10 pl3/ tclkb vss pvcc2 pl6/ adend pl5 / adtrg1 pk8/to8i pk12/ to8m pk14/ to8o pk15/ to8p pk6/ to8g pk10/ to8k pk11/ to8l pk13/ to8n avss an9 an10 an6 avcc avref an11 an12 an15 an13 an14 an17 an16 an18 an20 an25 an19 an22 an26 an29 an21 an23 an27 an30 an24 an28 an31 wdtovf avcc avref vss avss pvcc2 vcc pb0/to6a pa2/ti0c pa4/tio3a pa6/tio3c pa7/tio3d pa 1 4 / txd0 pa15/ rxd0 pb2/to6c pb3/to6d pb7/to7d/ to8d pb13/ sck0 vcl pg1/irq1 pj5/tio2f pj9/tio5d pj10/ti9a pj12/ti9c pj0/tio2a pj1/tio2b pa12/ tio5a pa13/ tio5b pb1/to6b vss pc2txd2 pj4/tio2e pj6/tio2g pj13/ti9d pj11/ti9b pj14/ti9e pk2/to8c pk0/to8a pa3/ti0d pa5/tio3b vss pvcc2 pc0/txd1 pc4/irq0 pvcc2 pj2/tio2c pj7/tio2h vss pvcc2 pj15/ti9f pk1/to8b pk3/to8d pk4/to8e pc1/rxd1 pc3/rxd2 vss vcc vss pj3/tio2d pj8/tio5c pk7/to8h pk5/to8f vcc pk9/to8j pa0/ti0a pa1/ti0b pvcc1 ph0/d0 fwe vcc pf14/ back vss pf7/wrh pf3/a19 pe15/a15 vss pe9/a9 vcc pe1/a1 l abc efghjk mnprt y w v u d pd9/ puls1 pd4/ tio1e a udck index top view figure 1.3 pin assignments
rev. 3.0, 09/04, page 10 of 1086 1.3.2 pin functions table 1.2 summarizes the pin functions. table 1.2 pin functions pin no. type symbol fp-256h bp-272 i/o name function v cc 11, 49, 52, 75, 139, 187, 203, 237 d5, d13, b14, f17, u16, u6, u4, j3 input power supply power supply for chip- internal and system ports ( res , md2 ? md0, fwe, hstby , nmi, ck, extal, xtal, h-udi port). connect all v cc pins to the system power supply. the chip will not operate if there are any open pins. pv cc 1 20, 39, 70, 83 c6, v11, d16, f18 input port power supply 1 power supply for bus ports (ports e, f, and h). connect all pv cc 1 pins to the system bus power supply. the chip will not operate if there are any open pins. pv cc 2 128, 148, 172, 194, 212, 247 u19, v15, v9, v5, p3, h4 input port power supply 2 power supply for peripheral module ports (ports a, b, c, d, g, j, k, and l, the aud port, and wdtovf ). connect all pv cc 2 pins to the system peripheral module power supply. the chip will not operate if there are any open pins. power supply v cl 30, 161, 225 b9, y11, m2 input internal step- down power supply pins for connection to a capacitor used for stablizing the voltage of the internal step-down power supply. connect v ss to this pin through a (0.33,0.47)- f capacitor. the capacitor should be located near the pin. do not connect an external power supply to the pin.
rev. 3.0, 09/04, page 11 of 1086 table 1.2 pin functions (cont) pin no. type symbol fp-256h bp-272 i/o name function power supply v ss 13, 22, 32, 41, 47, 54, 72, 77, 85, 126, 141, 150, 163, 174, 185, 196, 205, 214, 227, 239, 249 a9, b13, b15, d7, d11, f19, g3, g17, j4, j9-12, k9-12, l9-12, m1, m9-12, p4, t18, u5, u9, v6, v16, w11 input ground for connection to ground. connect all v ss pins to the system ground. the chip will not operate if there are any open pins. flash memory fwe 56 d14 input flash write enable connected to ground in normal operation. apply v cc during on-board programming. pllv cc 60 a17 input pll power supply on-chip pll oscillator power supply. for power supply connection, see section 5, clock pulse generator (cpg). pllv ss 62 a18 input pll ground on-chip pll oscillator ground. for power supply connection, see section 5, clock pulse generator (cpg). pllcap 61 b17 input pll capacitance on-chip pll oscillator external capacitance connection pin. for external capacitance connection, see section 5, clock pulse generator (cpg). extal 51 a14 input external clock for connection to a crystal resonator. an external clock source can also be connected to the extal pin. xtal 53 a15 input crystal for connection to a crystal resonator. clock ck 48 a13 output peripheral clock supplies the peripheral clock to peripheral devices.
rev. 3.0, 09/04, page 12 of 1086 table 1.2 pin functions (cont) pin no. type symbol fp-256h bp-272 i/o name function res 58 b16 input power-on reset executes a power-on reset when driven low. wdtovf 124 r17 output watchdog timer overflow wdt overflow output signal. breq 46 c13 input bus request driven low when an external device requests the bus. system control back 45 d12 output bus request acknowledge indicates that the bus has been granted to an external device. the device that output the breq signal recognizes that the bus has been acquired when it receives the back signal. md0 to md2 59, 55, 50 c16, c15, c14 input mode setting these pins determine the operating mode. do not change the input values during operation. operating mode control hstby 57 a16 input hardware standby when driven low, this pin forces a transition to hardware standby mode. nmi 84 e20 input nonmaskable interrupt nonmaskable interrupt request pin. acceptance on the rising edge or falling edge can be selected. irq0 to irq7 169, 171, 173, 175, 230, 226, 217, 218 v10, y8, w9, w8, k2, l3, p2, p1 input interrupt requests 0 to 7 maskable interrupt request pins. level input or edge input can be selected. interrupts irqout 231 k1 output interrupt request output indicates that an interrupt has been generated. enables interrupt generation to be recognized in the bus- released state.
rev. 3.0, 09/04, page 13 of 1086 table 1.2 pin functions (cont) pin no. type symbol fp-256h bp-272 i/o name function address bus a0 ? a21 7 ? 10, 12, 14 ? 19, 21, 23 ? 29, 31, 33, 34 b3, d4, c4, a3, b4, a4, c5, b5, a5, d6, b6, a6, c7, b7, a7, d8, c8, b8, a8, d9, c9, c10 output address bus address output pins. data bus d0 ? d15 63 ? 69, 71, 73, 74, 76, 78 ? 82 d15, b18, a19, c18, b19, b20, c17, c19, d18, d17, e17, e18, d19, c20, e19, d20 input/ output data bus 16-bit bidirectional data bus pins. cs0 ? cs3 40, 42 ? 44 a11, a12, c12, b12 output chip select 0 to 3 chip select signals for external memory or devices. rd 38 b11 output read indicates reading from an external device. wrh 36 d10 output upper write indicates writing of the upper 8 bits of external data. wrl 35 b10 output lower write indicates writing of the lower 8 bits of external data. bus control wait 37 a10 input wait input for wait cycle insertion in bus cycles during external space access. tclka tclkb 159, 162, 219 w12, y10, n3 input atu-ii timer clock input atu-ii counter external clock input pins. ti0a ? ti0d 125, 127, 129, 130 u18, t17, v20, v19 input atu-ii input capture (channel 0) channel 0 input capture input pins. tio1a ? tio1h 248, 250 ? 256 c1, g4, e2, b1, d2, f3, f4, e3 input/ output atu-ii input capture/output compare (channel 1) channel 1 input capture input/output compare output pins. advanced timer unit-ii (atu-ii) tio2a ? tio2h 176 ? 183 y7, y6, v8, u8, w7, y5, w6, v7 input/ output atu-ii input capture/output compare (channel 2) channel 2 input capture input/output compare output pins.
rev. 3.0, 09/04, page 14 of 1086 table 1.2 pin functions (cont) pin no. type symbol fp-256h bp-272 i/o name function tio3a ? tio3d 131 ? 134 w20, v18, w19, y19 input/ output atu-ii input capture/output compare/ pwm output (channel 3) channel 3 input capture input/output compare/pwm output pins. tio4a ? tio4d 135 ? 138 w18, u17, y18, v17 input/ output atu-ii input capture/output compare/ pwm output (channel 4) channel 4 input capture input/output compare/pwm output pins. tio5a ? tio5d 140, 142, 184, 186 w17, w16, u7, y4 input/ output atu-ii input capture/output compare/ pwm output (channel 5) channel 5 input capture input/output compare/pwm output pins. to6a ? to6d 145 ? 147, 149 u15, w15, y15, y14 output atu-ii pwm output (channel 6) channel 6 pwm output pins. to7a ? to7d 151 ? 154 u14, v14, w14, y13 output atu-ii pwm output (channel 7) channel 7 pwm output pins. to8a ? to8p 151 ? 158, 195, 197 ? 202, 204, 206 ? 211, 213, 215 u14, v14, w14, y13, w13, u13, v13, v12, w1, v3, w2, v2, v1, u1, t4, u2, r4, u3, t3, t2, r3, t1, r2, r1 output atu-ii one-shot pulse (channel 8) channel 8 down-counter one-shot pulse output pins. ti9a ? ti9f 188 ? 193 y3, w5, y2, w4, w3, v4 input atu-ii event input (channel 9) channel 9 event counter input pins. advanced timer unit-ii (atu-ii) ti10 162, 216 y10, n4 input atu-ii multiplied clock generation (channel 10) channel 10 external clock input pin.
rev. 3.0, 09/04, page 15 of 1086 table 1.2 pin functions (cont) pin no. type symbol fp-256h bp-272 i/o name function advanced timer unit-ii (atu-ii) tio11a, tio11b 217, 218 p2, p1 input/ output atu-ii input capture/output compare channel 11 input capture input/output compare output pins. advanced pulse controller (apc) puls0 ? puls7 1 ? 6, 164, 170 e4, d3, c2, c3, b2, a2, u12, y9 output apc pulse outputs 0 to 7 apc pulse output pins. txd0 ? txd4 143, 165, 167, 155, 157 y17, v11, w10, w13, v13 output transmit data (channels 0 to 4) sci0 to sci4 transmit data output pins. rxd0 ? rxd4 144, 166, 168, 156, 158 y16, u11, u10, u13, v12 input receive data (channels 0 to 4) sci0 to sci4 receive data input pins. serial communication interface (sci) sck0 ? sck4 160, 162, 223, 224, 226, 164 y12, y10, m3, l4, l3, u12 input/ output serial clock (channels 0 to 4) sci0 to sci4 clock input/output pins. htxd0, htxd1 157, 228, 6 v13, l1, a2 output transmit data can bus transmit data output pins. controller area network-ii (hcan-ii) hrxd0, hrxd1 158, 229, 170 v12, l2, y9 input receive data can bus receive data input pins. av cc 101, 119 k20, t20 input analog power supply a/d converter power supply. av ss 99, 121 j20, u20 input analog ground a/d converter power supply. av ref 100, 120 k19, t19 input analog reference power supply analog reference power supply input pins. a/d converter an0 ? an31 86 ? 98, 102 ? 118, 122, 123 h17, g18, g19, f20, h18, g20, j17, h19, h20, j19, j18, k18, k17, l19, l18, l20, m20, l17, m19, n20, m18, p20, n19, p19, r20, m17, n18, p18, r19, n17, p17, r18 input analog input analog signal input pins.
rev. 3.0, 09/04, page 16 of 1086 table 1.2 pin functions (cont) pin no. type symbol fp-256h bp-272 i/o name function adtrg0 , adtrg1 175, 220, 221 w8, m4, n1 input a/d conversion trigger input external trigger input pins for starting a/d conversion. adend 173, 222 w9, n2 output adend output a/d2 channel 31 conversion timing monitor output pins. adto0a 135 w18 output pwm output pwm output pin for multi- trigger a/d conversion. adto0b 136 u17 output pwm output pwm output pin for multi- trigger a/d conversion. adto1a 137 y18 output pwm output pwm output pin for multi- trigger a/d conversion. a/d converter adto1b 138 v17 output pwm output pwm output pin for multi- trigger a/d conversion. user break controller (ubc) ubctrg 159 w12 output user break trigger output ubc condition match trigger output pin. tck 236 j2 input test clock test clock input pin. tms 232 k3 input test mode select test mode select signal input pin. tdi 234 k4 input test data input instruction/data serial input pin. tdo 235 h1 output test data output instruction/data serial output pin. high- performance user debug interface (h-udi) trst 233 j1 input test reset initialization signal input pin. audata0 ? audata3 241 ? 244 g1, f1, g2, e1 input/ output aud data branch trace mode: branch destination address output pins. ram monitor mode: monitor address input / data input/output pins. audrst 238 h2 input aud reset reset signal input pin. advanced user debugger (aud) audmd 240 h3 input aud mode mode select signal input pin. branch trace mode: low ram monitor mode: high
rev. 3.0, 09/04, page 17 of 1086 table 1.2 pin functions (cont) pin no. type symbol fp-256h bp-272 i/o name function audck 245 d1 input/ output aud clock branch trace mode: serial clock output pin. ram monitor mode: serial clock input pin. advanced user debugger (aud) audsync 246 f2 input/ output aud synchronizatio n signal branch trace mode: data start position identification signal output pin. ram monitor mode: data start position identification signal input pin. pod 34 c10 input port output disable input pin for port pin drive control when general port is set for output. pa0 ? pa15 125, 127, 129 ? 138, 140, 142 ? 144 u18, t17, v20, v19, w20, v18, w19, y19, w18, u17, y18, v17, w17, w16, y17, y16 input/ output port a general input/output port pins. input or output can be specified bit by bit. pb0 ? pb15 145 ? 147, 149, 151 ? 160, 162, 164 u15, w15, y15, y14, u14, v14, w14, y13, w13, u13, v13, v12, w12, y12, y10, u12 input/ output port b general input/output port pins. input or output can be specified bit by bit. pc0 ? pc4 165 ? 169 v11, u11, w10, u10, v10 input/ output port c general input/output port pins. input or output can be specified bit by bit. i/o ports pd0 ? pd13 248, 250 ? 256, 1 ? 6 c1, g4, e2, b1, d2, f3, f4, e3, e4, d3, c2, c3, b2, a2 input/ output port d general input/output port pins. input or output can be specified bit by bit.
rev. 3.0, 09/04, page 18 of 1086 table 1.2 pin functions (cont) pin no. type symbol fp-256h bp-272 i/o name function pe0 ? pe15 7 ? 10, 12, 14 ? 19, 21, 23 ? 26 b3, d4, c4, a3, b4, a4, c5, b5, a5, d6, b6, a6, c7, b7, a7, d8 input/ output port e general input/output port pins. input or output can be specified bit by bit. pf0 ? pf15 27 ? 29, 31, 33 ? 38, 40, 42 ? 46 c8, b8, a8, d9, c9, c10, b10, d10, a10, b11, a11, a12, c12, b12, d12, c13 input/ output port f general input/output port pins. input or output can be specified bit by bit. pg0 ? pg3 170, 171, 173, 175 y9, y8, w9, w8 input/ output port g general input/output port pins. input or output can be specified bit by bit. ph0 ? ph15 63 ? 69, 71, 73, 74, 76, 78 ? 82 d15, b18, a19, c18, b19, b20, c17, c19, d18, d17, e17, e18, d19, c20, e19, d20 input/ output port h general input/output port pins. input or output can be specified bit by bit. pj0 ? pj15 176 ? 184, 186, 188 ? 193 y7, y6, v8, u8, w7, y5, w6, v7, u7, y4, y3, w5, y2, w4, w3, v4 input/ output port j general input/output port pins. input or output can be specified bit by bit. pk0 ? pk15 195, 197 ? 202, 204, 206 ? 211, 213, 215 w1, v3, w2, v2, v1, u1, t4, u2, r4, u3, t3, t2, r3, t1, r2, r1 input/ output port k general input/output port pins. input or output can be specified bit by bit. i/o ports pl0 ? pl13 216 ? 224, 226, 228 ? 231 n4, p2, p1, n3, m4, n1, n2, m3, l4, l3, l1, l2, k2, k1 input/ output port l general input/output port pins. input or output can be specified bit by bit.
rev. 3.0, 09/04, page 19 of 1086 1.3.3 pin assignments table 1.3 pin assignments pin no. fp-256h bp-272 mcu mode programmer mode 1 e4 pd8/puls0 nc 2 d3 pd9/puls1 nc 3 c2 pd10/puls2 nc 4 c3 pd11/puls3 nc 5 b2 pd12/puls4 nc 6 a2 pd13/puls6/htxd0/htxd1 nc 7 b3 pe0/a0 a0 8 d4 pe1/a1 a1 9 c4 pe2/a2 a2 10 a3 pe3/a3 a3 11 d5 vcc vcc 12 b4 pe4/a4 a4 13 * vss vss 14 a4 pe5/a5 a5 15 c5 pe6/a6 a6 16 b5 pe7/a7 a7 17 a5 pe8/a8 a8 18 d6 pe9/a9 a9 19 b6 pe10/a10 a10 20 c6 pvcc1 vcc 21 a6 pe11/a11 a11 22 * vss vss 23 c7 pe12/a12 a12 24 b7 pe13/a13 a13 25 a7 pe14/a14 a14 26 d8 pe15/a15 a15 27 c8 pf0/a16 a16 28 b8 pf1/a17 a17 29 a8 pf2/a18 a18 30 b9 v cl v cl
rev. 3.0, 09/04, page 20 of 1086 table 1.3 pin assignments (cont) pin no. fp-256h bp-272 mcu mode programmer mode 31 d9 pf3/a19 a19 32 * vss vss 33 c9 pf4/a20 nc 34 c10 pf5/a21/ pod nc 35 b10 pf6/ wrl nc 36 d10 pf7/ wrh nc 37 a10 pf8/ wait vcc 38 b11 pf9/ rd nc 39 c11 pvcc1 vcc 40 a11 pf10/ cs0 nc 41 * vss vss 42 a12 pf11/ cs1 vcc 43 c12 pf12/ cs2 vcc 44 b12 pf13/ cs3 vss 45 d12 pf14/ back nc 46 c13 pf15/ breq vcc 47 * vss vss 48 a13 ck nc 49 d13 vcc vcc 50 c14 md2 vss 51 a14 extal extal 52 b14 vcc vcc 53 a15 xtal xtal 54 * vss vss 55 c15 md1 vcc 56 d14 fwe fwe 57 a16 hstby vcc 58 b16 res res 59 c16 md0 vcc 60 a17 pllvcc pllvcc 61 b17 pllcap pllcap
rev. 3.0, 09/04, page 21 of 1086 table 1.3 pin assignments (cont) pin no. fp-256h bp-272 mcu mode programmer mode 62 a18 pllvss pllvss 63 d15 ph0/d0 d0 64 b18 ph1/d1 d1 65 a19 ph2/d2 d2 66 c18 ph3/d3 d3 67 b19 ph4/d4 d4 68 b20 ph5/d5 d5 69 c17 ph6/d6 d6 70 d16 pvcc1 vcc 71 c19 ph7/d7 d7 72 * vss vss 73 d18 ph8/d8 nc 74 d17 ph9/d9 nc 75 f17 vcc vcc 76 e17 ph10/d10 nc 77 * vss vss 78 e18 ph11/d11 nc 79 d19 ph12/d12 nc 80 c20 ph13/d13 nc 81 e19 ph14/d14 nc 82 d20 ph15/d15 nc 83 f18 pvcc1 vcc 84 e20 nmi vss 85 * vss vss 86 h17 an0 nc 87 g18 an1 nc 88 g19 an2 nc 89 f20 an3 nc 90 h18 an4 nc 91 g20 an5 nc 92 j17 an6 nc
rev. 3.0, 09/04, page 22 of 1086 table 1.3 pin assignments (cont) pin no. fp-256h bp-272 mcu mode programmer mode 93 h19 an7 nc 94 h20 an8 nc 95 j19 an9 nc 96 j18 an10 nc 97 k18 an11 nc 98 k17 an12 nc 99 j20 avss vss 100 k19 av ref vcc 101 k20 avcc vcc 102 l19 an13 nc 103 l18 an14 nc 104 l20 an15 nc 105 m20 an16 nc 106 l17 an17 nc 107 m19 an18 nc 108 n20 an19 nc 109 m18 an20 nc 110 p20 an21 nc 111 n19 an22 nc 112 p19 an23 nc 113 r20 an24 nc 114 m17 an25 nc 115 n18 an26 nc 116 p18 an27 nc 117 r19 an28 nc 118 n17 an29 nc 119 t20 avcc vcc 120 t19 av ref vcc 121 u20 avss vss 122 p17 an30 nc 123 r18 an31 nc
rev. 3.0, 09/04, page 23 of 1086 table 1.3 pin assignments (cont) pin no. fp-256h bp-272 mcu mode programmer mode 124 r17 wdtovf nc 125 u18 pa0/ti0a nc 126 * vss vss 127 t17 pa1/ti0b nc 128 u19 pvcc2 vcc 129 v20 pa2/ti0c nc 130 v19 pa3/ti0d nc 131 w20 pa4/tio3a nc 132 v18 pa5/tio3b nc 133 w19 pa6/tio3c nc 134 y19 pa7/tio3d nc 135 w18 pa8/tio4a/adto0a nc 136 u17 pa9/tio4b/adto0b nc 137 y18 pa10/tio4c/adto1a nc 138 v17 pa11/tio4d/adto1b nc 139 u16 vcc vcc 140 w17 pa12/tio5a nc 141 * vss vss 142 w16 pa13/tio5b nc 143 y17 pa14/txd0 nc 144 y16 pa15/rxd0 nc 145 u15 pb0/to6a nc 146 w15 pb1/to6b nc 147 y15 pb2/to6c nc 148 v15 pvcc2 vcc 149 y14 pb3/to6d nc 150 * vss vss 151 u14 pb4/to7a/to8a nc 152 v14 pb5/to7b/to8b nc 153 w14 pb6/to7c/to8c nc 154 y13 pb7/to7d/to8d nc
rev. 3.0, 09/04, page 24 of 1086 table 1.3 pin assignments (cont) pin no. fp-256h bp-272 mcu mode programmer mode 155 w13 pb8/txd3/to8e nc 156 u13 pb9/rxd3/to8f nc 157 v13 pb10/txd4/htxd0/to8g nc 158 v12 pb11/rxd4/hrxd0/to8h nc 159 w12 pb12/tclka/ ubctrg nc 160 y12 pb13/sck0 nc 161 y11 v cl v cl 162 y10 pb14/sck1/tclkb/ti10 nc 163 * vss vss 164 u12 pb15/puls5/sck2 nc 165 v11 pc0/txd1 nc 166 u11 pc1/rxd1 nc 167 w10 pc2/txd2 nc 168 u10 pc3/rxd2 nc 169 v10 pc4/ irq0 nc 170 y9 pg0/puls7/hrxd0/hrxd1 nc 171 y8 pg1/ irq1 nc 172 v9 pvcc2 vcc 173 w9 pg2/ irq2 /adend nc 174 * vss vss 175 w8 pg3/ irq3 / adtrg0 nc 176 y7 pj0/tio2a nc 177 y6 pj1/tio2b nc 178 v8 pj2/tio2c nc 179 u8 pj3/tio2d nc 180 w7 pj4/tio2e nc 181 y5 pj5/tio2f nc 182 w6 pj6/tio2g nc 183 v7 pj7/tio2h nc 184 u7 pj8/tio5c nc 185 * vss vss
rev. 3.0, 09/04, page 25 of 1086 table 1.3 pin assignments (cont) pin no. fp-256h bp-272 mcu mode programmer mode 186 y4 pj9/tio5d nc 187 u6 vcc vcc 188 y3 pj10/ti9a nc 189 w5 pj11/ti9b nc 190 y2 pj12/ti9c nc 191 w4 pj13/ti9d nc 192 w3 pj14/ti9e nc 193 v4 pj15/ti9f nc 194 v5 pvcc2 vcc 195 w1 pk0/to8a nc 196 * vss vss 197 v3 pk1/to8b nc 198 w2 pk2/to8c nc 199 v2 pk3/to8d nc 200 v1 pk4/to8e nc 201 u1 pk5/to8f nc 202 t4 pk6/to8g nc 203 u4 vcc vcc 204 u2 pk7/to8h nc 205 * vss vss 206 r4 pk8/to8i nc 207 u3 pk9/to8j nc 208 t3 pk10/to8k nc 209 t2 pk11/to8l nc 210 r3 pk12/to8m nc 211 t1 pk13/to8n nc 212 p3 pvcc2 vcc 213 r2 pk14/to8o nc 214 * vss vss 215 r1 pk15/to8p nc 216 n4 pl0/ti10 nc
rev. 3.0, 09/04, page 26 of 1086 table 1.3 pin assignments (cont) pin no. fp-256h bp-272 mcu mode programmer mode 217 p2 pl1/tio11a/ irq6 nc 218 p1 pl2/tio11b/ irq7 ce 219 n3 pl3/tclkb nc 220 m4 pl4/ adtrg0 nc 221 n1 pl5/ adtrg1 nc 222 n2 pl6/adend nc 223 m3 pl7/sck2 nc 224 l4 pl8/sck3 nc 225 m2 v cl v cl 226 l3 pl9/sck4/ irq5 we 227 * vss vss 228 l1 pl10/htxd0/htxd1/htxd0 & htxd1 nc 229 l2 pl11/hrxd0/hrxd1/hrxd0 & hrxd1 nc 230 k2 pl12/ irq4 oe 231 k1 pl13/ irqout nc 232 k3 tms nc 233 j1 trst nc 234 k4 tdi nc 235 h1 tdo nc 236 j2 tck nc 237 j3 vcc vcc 238 h2 audrst nc 239 * vss vss 240 h3 audmd nc 241 g1 audata0 nc 242 f1 audata1 nc 243 g2 audata2 nc 244 e1 audata3 nc 245 d1 audck nc 246 f2 audsync nc 247 h4 pvcc2 vcc
rev. 3.0, 09/04, page 27 of 1086 table 1.3 pin assignments (cont) pin no. fp-256h bp-272 mcu mode programmer mode 248 c1 pd0/tio1a nc 249 * vss vss 250 g4 pd1/tio1b nc 251 e2 pd2/tio1c nc 252 b1 pd3/tio1d nc 253 d2 pd4/tio1e nc 254 f3 pd5/tio1f nc 255 f4 pd6/tio1g nc 256 e3 pd7/tio1h nc ? a1 nc nc ? a20 nc nc ? y1 nc nc ? y20 nc nc * vss is connected in the board.
rev. 3.0, 09/04, page 28 of 1086
rev. 3.0, 09/04, page 29 of 1086 section 2 cpu 2.1 register configuration the register set consists of sixteen 32-bit general registers, three 32-bit control registers and four 32-bit system registers. in addition, the fpu has eighteen internal registers: sixteen 32-bit floating-point registers and two 32-bit floating-point system registers. 2.1.1 general registers (rn) the sixteen 32-bit general registers (rn) are numbered r0?r15. general registers are used for data processing and address calculation. r0 is also used as an index register. several instructions have r0 fixed as their only usable register. r15 is used as the hardware stack pointer (sp). saving and recovering the status register (sr) and program counter (pc) in exception processing is accomplished by referencing the stack using r15. figure 2.1 shows the general registers. r0 * 1 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15, sp (hardware stack pointer) * 2 0 31 1. 2. r0 functions as an index register in the indirect indexed register addressing mode and indirect indexed gbr addressing mode. in some instructions, r0 functions as a fixed source register or destination register. r15 functions as a hardware stack pointer (sp) during exception processing. notes: figure 2.1 general registers
rev. 3.0, 09/04, page 30 of 1086 2.1.2 control registers the 32-bit control registers consist of the 32-bit status register (sr), global base register (gbr), and vector base register (vbr). the status register indicates processing states. the global base register functions as a base address for the indirect gbr addressing mode to transfer data to the registers of on-chip peripheral modules. the vector base register functions as the base address of the exception processing vector area (including interrupts). figure 2.2 shows the control registers. 9876543210 mqi3 i2 i1 i0 st 0 0 31 31 gbr vbr sr 31 s bit: used by the mac instruction. reserved bits. these bits always read 0. the write value should always be 0. reserved bits. these bits always read 0. the write value should always be 0. bits i3?i0: interrupt mask bits. m and q bits: used by the div0u, div0s, and div1 instructions. global base register (gbr): indicates the base address of the indirect gbr addressing mode. the indirect gbr addressing mode is used in data transfer for on-chip peripheral module register areas and in logic operations. vector base register (vbr): stores the base address of the exception processing vector area. sr: status register t bit: the movt, cmp/cond, tas, tst, bt (bt/s), bf (bf/s), sett, clrt, and fcmp/cond instructions use the t bit to indicate true (1) or false (0). the addv, addc, subv, subc, negc, div0u, div0s, div1, shar, shal, shlr, shll, rotr, rotl, rotcr, and rotcl instructions also use the t bit to indicate carry/borrow or overflow/underflow. figure 2.2 control register configuration
rev. 3.0, 09/04, page 31 of 1086 2.1.3 system registers system registers consist of four 32-bit registers: high and low multiply and accumulate registers (mach and macl), the procedure register (pr), and the program counter (pc). the multiply- and-accumulate registers store the results of multiply-and-accumulate operations. the procedure register stores the return address from a subroutine procedure. the program counter stores program addresses to control the flow of the processing. figure 2.3 shows the system registers. macl pr pc mach 31 0 0 0 31 31 multiply-and-accumulate (mac) registers high and low (mach, macl): store the results of multiply-and-accumulate operations. procedure register (pr): stores the return address from a subroutine procedure. program counter (pc): indicates the fourth byte (second instruction) after the current instruction. figure 2.3 system register configuration
rev. 3.0, 09/04, page 32 of 1086 2.1.4 floating-point registers there are sixteen 32-bit floating-point registers, designated fr0 to fr15, which are used by floating-point instructions. fr0 functions as the index register for the fmac instruction. these registers are incorporated into the floating-point unit (fpu). for details, see section 3, floating- point unit (fpu). 31 0 fr0 fr1 fr2 fr3 fr4 fr5 fr6 fr7 fr8 fr9 fr10 fr11 fr12 fr13 fr14 fr15 fr0 functions as the index register for the fmac instruction. figure 2.4 floating-point registers
rev. 3.0, 09/04, page 33 of 1086 2.1.5 floating-point system registers there are two 32-bit floating-point system registers: the floating-point communication register (fpul) and the floating-point status/control register (fpscr). fpul is used for communication between the cpu and the floating-point unit (fpu). fpscr indicates and stores status/control information relating to fpu exceptions. these registers are incorporated into the floating-point unit (fpu). for details, see section 3, floating-point unit (fpu). 0 0 31 fpul 31 fpscr fpul: floating-point communication register used for communication between the cpu and the fpu. fpscr: floating-point status/control register indicates and stores status/control information relating to fpu exceptions. figure 2.5 floating-point system registers 2.1.6 initial values of registers table 2.1 lists the values of the registers after reset. table 2.1 initial values of registers classification register initial value r0?r14 undefined general registers r15 (sp) value of the stack pointer in the vector address table sr bits i3?i0 are 1111 (h'f), reserved bits are 0, and other bits are undefined gbr undefined control registers vbr h'00000000 mach, macl, pr undefined system registers pc value of the program counter in the vector address table floating-point registers fr0?fr15 undefined fpul undefined floating-point system registers fpscr h'00040001
rev. 3.0, 09/04, page 34 of 1086 2.2 data formats 2.2.1 data format in registers register operands are always longwords (32 bits). when the memory operand is only a byte (8 bits) or a word (16 bits), it is sign-extended into a longword when loaded into a register (figure 2.6). 31 0 longword figure 2.6 data format in registers 2.2.2 data formats in memory memory data formats are classified into bytes, words, and longwords. byte data can be accessed from any address, but an address error will occur if an attempt is made to access word data starting from an address other than 2n or longword data starting from an address other than 4n. in such cases, the data accessed cannot be guaranteed. the hardware stack area, referred to by the hardware stack pointer (sp, r15), uses only longword data starting from address 4n because this area holds the program counter and status register (figure 2.7). 31 0 15 23 7 byte byte byte byte word word address 2n address 4n longword address m address m + 2 address m + 1 address m + 3 figure 2.7 data formats in memory 2.2.3 immediate data format byte (8 bit) immediate data resides in an instruction code. immediate data accessed by the mov, add, and cmp/eq instructions is sign-extended and handled in registers as longword data. immediate data accessed by the tst, and, or, and xor instructions is zero-extended and handled as longword data. consequently, and instructions with immediate data always clear the upper 24 bits of the destination register.
rev. 3.0, 09/04, page 35 of 1086 word or longword immediate data is not located in the instruction code, but instead is stored in a memory table. an immediate data transfer instruction (mov) accesses the memory table using the pc relative addressing mode with displacement. 2.3 instruction features 2.3.1 risc-type instruction set all instructions are risc type. this section details their functions. 16-bit fixed length : all instructions are 16 bits long, increasing program code efficiency. one instruction per cycle : the microprocessor can execute basic instructions in one cycle using the pipeline system. instructions are executed in 25 ns at 40 mhz. data length : longword is the standard data length for all operations. memory can be accessed in bytes, words, or longwords. byte or word data accessed from memory is sign-extended and handled as longword data. immediate data is sign-extended for arithmetic operations or zero- extended for logic operations. it also is handled as longword data (table 2.2). table 2.2 sign extension of word data sh7058 cpu description example of conventional cpu mov.w @(disp,pc),r1 add r1,r0 ......... .data.w h'1234 data is sign-extended to 32 bits, and r1 becomes h'00001234. it is next operated upon by an add instruction. add.w #h'1234,r0 note: @(disp, pc) accesses the immediate data. load-store architecture : basic operations are executed between registers. for operations that involve memory access, data is loaded to the registers and executed (load-store architecture). instructions such as and that manipulate bits, however, are executed directly in memory. delayed branch instructions : unconditional branch instructions are delayed branch instructions. with a delayed branch instruction, the branch is taken after execution of the instruction following the delayed branch instruction. there are two types of conditional branch instructions: delayed branch instructions and ordinary branch instructions.
rev. 3.0, 09/04, page 36 of 1086 table 2.3 delayed branch instructions sh7058 cpu description example of conventional cpu bra trget add r1,r0 executes the add before branching to trget. add.w r1,r0 bra trget multiply/multiply-and-accumulate operations: 16-bit 16-bit 32-bit multiply operations are executed in one to two cycles. 16-bit 16-bit + 64-bit 64-bit multiply-and-accumulate operations are executed in two to three cycles. 32-bit 32-bit 64-bit multiply and 32-bit 32- bit + 64bit 64-bit multiply-and-accumulate operations are executed in two to four cycles. t bit : the t bit in the status register changes according to the result of the comparison, and in turn is the condition (true/false) that determines if the program will branch. the number of instructions that change the t bit is kept to a minimum to improve the processing speed (table 2.4). table 2.4 t bit sh7058 cpu description example of conventional cpu cmp/ge r1,r0 bt trget0 bf trget1 t bit is set when r0 r1. the program branches to trget0 when r0 r1 and to trget1 when r0 < r1. cmp.w r1,r0 bge trget0 blt trget1 add #1,r0 cmp/eq #0,r0 bt trget t bit is not changed by add. t bit is set when r0 = 0. the program branches if r0 = 0. sub.w #1,r0 beq trget immediate data : byte (8-bit) immediate data resides in the instruction code. word or longword immediate data is not input via instruction codes but is stored in a memory table. an immediate data transfer instruction (mov) accesses the memory table using the pc relative addressing mode with displacement (table 2.5).
rev. 3.0, 09/04, page 37 of 1086 table 2.5 immediate data accessing classification sh7058 cpu example of conventional cpu 8-bit immediate mov #h'12,r0 mov.b #h'12,r0 16-bit immediate mov.w @(disp,pc),r0 ................. .data.w h'1234 mov.w #h'1234,r0 32-bit immediate mov.l @(disp,pc),r0 ................. .data.l h'12345678 mov.l #h'12345678,r0 note: @(disp, pc) accesses the immediate data. absolute address : when data is accessed by absolute address, the value already in the absolute address is placed in the memory table. loading the immediate data when the instruction is executed transfers that value to the register and the data is accessed in the indirect register addressing mode (table 2.6). table 2.6 absolute address accessing classification sh7058 cpu example of conventional cpu absolute address mov.l @(disp,pc),r1 mov.b @r1,r0 .................. .data.l h'12345678 mov.b @h'12345678,r0 note: @(disp,pc) accesses the immediate data. 16-bit/32-bit displacement : when data is accessed by 16-bit or 32-bit displacement, the pre- existing displacement value is placed in the memory table. loading the immediate data when the instruction is executed transfers that value to the register and the data is accessed in the indirect indexed register addressing mode (table 2.7). table 2.7 displacement accessing classification sh7058 cpu example of conventional cpu 16-bit displacement mov.w @(disp,pc),r0 mov.w @(r0,r1),r2 .................. .data.w h'1234 mov.w @(h'1234,r1),r2 note: @(disp,pc) accesses the immediate data.
rev. 3.0, 09/04, page 38 of 1086 2.3.2 addressing modes table 2.8 describes addressing modes and effective address calculation. table 2.8 addressing modes and effective addresses addressing mode instruction format effective address calculation equation direct register addressing rn the effective address is register rn. (the operand is the contents of register rn.) ? indirect register addressing @rn the effective address is the contents of register rn. rn rn rn post-increment indirect register addressing @rn+ the effective address is the contents of register rn. a constant is added to the content of rn after the instruction is executed. 1 is added for a byte operation, 2 for a word operation, and 4 for a longword operation. rn rn 1/2/4 + rn + 1/2/4 rn (after the instruction executes) byte: rn + 1 rn word: rn + 2 rn longword: rn + 4 rn pre-decrement indirect register addressing @?rn the effective address is the value obtained by subtracting a constant from rn. 1 is subtracted for a byte operation, 2 for a word operation, and 4 for a longword operation. rn 1/2/4 rn ? 1/2/4 ? rn ? 1/2/4 byte: rn ? 1 rn word: rn ? 2 rn longword: rn ? 4 rn (instruction executed with rn after calculation) indirect register addressing with displacement @(disp:4, rn) the effective address is rn plus a 4-bit displacement (disp). the value of disp is zero- extended, and remains the same for a byte operation, is doubled for a word operation, and is quadrupled for a longword operation. rn rn + disp 1/2/4 + 1/2/4 disp (zero-extended) byte: rn + disp word: rn + disp 2 longword: rn + disp 4
rev. 3.0, 09/04, page 39 of 1086 table 2.8 addressing modes and effective addresses (cont) addressing mode instruction format effective address calculation equation indirect indexed register addressing @(r0, rn) the effective address is the rn value plus r0. rn r0 rn + r0 + rn + r0 indirect gbr addressing with displacement @(disp:8, gbr) the effective address is the gbr value plus an 8-bit displacement (disp). the value of disp is zero- extended, and remains the same for a byte opera- tion, is doubled for a word operation, and is quadrupled for a longword operation. gbr 1/2/4 gbr + disp 1/2/4 + disp (zero-extended) byte: gbr + disp word: gbr + disp 2 longword: gbr + disp 4 indirect indexed gbr addressing @(r0, gbr) the effective address is the gbr value plus r0. gbr r0 gbr + r0 + gbr + r0 indirect pc addressing with displacement @(disp:8, pc) the effective address is the pc value plus an 8-bit displacement (disp). the value of disp is zero- extended, and is doubled for a word operation, and quadrupled for a longword operation. for a longword?operation, the lowest two bits of the pc value are masked. pc h'fffffffc pc + disp 2 or pc & h'fffffffc + disp 4 + 2/4 & (for longword) disp (zero-extended) word: pc + disp 2 longword: pc & h'fffffffc + disp 4
rev. 3.0, 09/04, page 40 of 1086 table 2.8 addressing modes and effective addresses (cont) addressing mode instruction format effective addresses calculation equation disp:8 the effective address is the pc value sign- extended with an 8-bit displacement (disp), doubled, and added?to the pc value. pc 2 + disp (sign-extended) pc + disp 2 pc + disp 2 disp:12 the effective address is the pc value sign- extended with a 12-bit displacement (disp), doubled, and added?to the pc value. pc 2 + disp (sign-extended) pc + disp 2 pc + disp ?2 pc relative addressing rn the effective address is the register pc value plus rn. pc rn pc + rn + pc + rn #imm:8 the 8-bit immediate data (imm) for the tst, and, or, and xor instructions is zero-extended. ? #imm:8 the 8-bit immediate data (imm) for the mov, add, and cmp/eq instructions is sign-extended. ? immediate addressing #imm:8 the 8-bit immediate data (imm) for the trapa instruction is zero-extended and quadrupled. ?
rev. 3.0, 09/04, page 41 of 1086 2.3.3 instruction format table 2.9 lists the instruction formats for the source operand and the destination operand. the meaning of the operand depends on the instruction code. the symbols used are as follows: ? xxxx: instruction code ? mmmm: source register ? nnnn: destination register ? iiii: immediate data ? dddd: displacement table 2.9 instruction formats instruction formats source operand destination operand example 0 format xxxx xxxx xxxx xxxx 15 0 ?? nop ? nnnn: direct register movt rn control register or system register nnnn: direct register sts mach,rn n format xxxx xxxx xxxx nnnn 15 0 control register or system register nnnn: indirect pre- decrement register stc.l sr,@-rn mmmm: direct register control register or system register ldc rm,sr mmmm: indirect post-increment register control register or system register ldc.l @rm+,sr mmmm: direct register ? jmp @rm m format xxxx mmmm xxxx xxxx 15 0 mmmm: pc relative using rm ? braf rm
rev. 3.0, 09/04, page 42 of 1086 table 2.9 instruction formats (cont) instruction formats source operand destination operand example mmmm: direct register nnnn: direct register add rm,rn mmmm: direct register nnnn: indirect register mov.l rm,@rn mmmm: indirect post-increment register (multiply- and-accumulate) nnnn * : indirect post-increment register (multiply- and-accumulate) mach, macl mac.w @rm+,@rn+ mmmm: indirect post-increment register nnnn: direct register mov.l @rm+,rn mmmm: direct register nnnn: indirect pre- decrement register mov.l rm,@-rn nm format nnnn xxxx xxxx 15 0 mmmm mmmm: direct register nnnn: indirect indexed register mov.l rm,@(r0,rn) md format xxxx dddd 15 0 mmmm xxxx mmmmdddd: indirect register with displacement r0 (direct register) mov.b @(disp,rn),r0 nd4 format xxxx xxxx dddd 15 0 nnnn r0 (direct register) nnnndddd: indirect register with displacement mov.b r0,@(disp,rn) mmmm: direct register nnnndddd: indirect register with displacement mov.l rm,@(disp,rn) nmd format nnnn xxxx dddd 15 0 mmmm mmmmdddd: indirect register with displacement nnnn: direct register mov.l @(disp,rm),rn note: * in multiply-and-accumulate instructions, nnnn is the source register.
rev. 3.0, 09/04, page 43 of 1086 table 2.9 instruction formats (cont) instruction formats source operand destination operand example dddddddd: indirect gbr with displacement r0 (direct register) mov.l @(disp,gbr),r0 r0 (direct register) dddddddd: indirect gbr with displacement mov.l r0,@(disp,gbr) dddddddd: pc relative with displacement r0 (direct register) mova @(disp,pc),r0 d format dddd xxxx 15 0 xxxx dddd ? dddddddd: pc relative bf label d12 format dddd xxxx 15 0 dddd dddd ? dddddddddddd: pc relative bra label (label = disp + pc) nd8 format dddd nnnn xxxx 15 0 dddd dddddddd: pc relative with displacement nnnn: direct register mov.l @(disp,pc),rn iiiiiiii: immediate indirect indexed gbr and.b #imm,@(r0,gbr) iiiiiiii: immediate r0 (direct register) and #imm,r0 i format xxxx xxxx i i i i 15 0 i i i i iiiiiiii: immediate ? trapa #imm ni format nnnn i i i i xxxx 15 0 i i i i iiiiiiii: immediate nnnn: direct register add #imm,rn 2.4 instruction set by classification 2.4.1 instruction set by classification table 2.10 lists the instructions according to their classification.
rev. 3.0, 09/04, page 44 of 1086 table 2.10 classification of instructions classification types operation code function no. of instructions mov data transfer, immediate data transfer, peripheral module data transfer, structure data transfer mova effective address transfer movt t bit transfer swap swap of upper and lower bytes data transfer 5 xtrct extraction of the middle of registers connected 39 add binary addition addc binary addition with carry addv binary addition with overflow check cmp/cond comparison div1 division div0s initialization of signed division div0u initialization of unsigned division dmuls signed double-length multiplication dmulu unsigned double-length multiplication dt decrement and test exts sign extension extu zero extension mac multiply-and-accumulate, double-length multiply-and-accumulate operation mul double-length multiply operation muls signed multiplication mulu unsigned multiplication neg negation negc negation with borrow sub binary subtraction subc binary subtraction with borrow arithmetic operations 21 subv binary subtraction with underflow 33
rev. 3.0, 09/04, page 45 of 1086 table 2.10 classification of instructions (cont) classification types operation code function no. of instructions and logical and not bit inversion or logical or tas memory test and bit set tst logical and and t bit set logic operations 6 xor exclusive or 14 rotl one-bit left rotation rotr one-bit right rotation rotcl one-bit left rotation with t bit rotcr one-bit right rotation with t bit shal one-bit arithmetic left shift shar one-bit arithmetic right shift shll one-bit logical left shift shlln n-bit logical left shift shlr one-bit logical right shift shift 10 shlrn n-bit logical right shift 14 bf conditional branch, conditional branch with delay (branch when t = 0) bt conditional branch, conditional branch with delay (branch when t = 1) bra unconditional branch braf unconditional branch bsr branch to subroutine procedure bsrf branch to subroutine procedure jmp unconditional branch jsr branch to subroutine procedure branch 9 rts return from subroutine procedure 11
rev. 3.0, 09/04, page 46 of 1086 table 2.10 classification of instructions (cont) classification types operation code function no. of instructions clrt t bit clear clrmac mac register clear ldc load to control register lds load to system register nop no operation rte return from exception processing sett t bit set sleep transition to power-down mode stc store control register data sts store system register data system control 11 trapa trap exception handling 31 fabs floating-point absolute value fadd floating-point addition fcmp floating-point comparison fdiv floating-point division fldi0 floating-point load immediate 0 fldi1 floating-point load immediate 1 flds floating-point load into system register fpul float integer-to-floating-point conversion fmac floating-point multiply-and-accumulate operation fmov floating-point data transfer fmul floating-point multiplication fneg floating-point sign inversion fsts floating-point store from system register fpul fsub floating-point subtraction floating-point instructions 15 ftrc floating-point conversion with rounding to integer 22 lds load into floating-point system register fpu-related cpu instructions 2 sts store from floating-point system register 8 total: 79 172
rev. 3.0, 09/04, page 47 of 1086 table 2.11 shows the format used in tables 2.12 to 2.19, which list instruction codes, operation, and execution states in order by classification. table 2.11 instruction code format item format explanation instruction op.sz src,dest op: operation code sz: size (b: byte, w: word, or l: longword) src: source dest: destination rm: source register rn: destination register imm: immediate data disp: displacement * 1 instruction code msb ? ? ? ? ? value when no wait states are inserted * 2 t bit ? value of t bit after instruction is executed. an em-dash ( ? ) in the column means no change. notes: 1. depending on the operand size, displacement is scaled sh-2e programming manual . 2. instruction execution cycles: the execution cycles shown in the table are minimums. the actual number of cycles may be increased when (1) contention occurs between instruction fetches and data access, or (2) when the destination register of the load instruction (memory
rev. 3.0, 09/04, page 48 of 1086 table 2.12 data transfer instructions instruction instruction code operation execu- tion cycles t bit mov #imm,rn 1110nnnniiiiiiii #imm ? mov.w @(disp,pc),rn 1001nnnndddddddd (disp ? mov.l @(disp,pc),rn 1101nnnndddddddd (disp ? mov rm,rn 0110nnnnmmmm0011 rm ? mov.b rm,@rn 0010nnnnmmmm0000 rm ? mov.w rm,@rn 0010nnnnmmmm0001 rm ? mov.l rm,@rn 0010nnnnmmmm0010 rm ? mov.b @rm,rn 0110nnnnmmmm0000 (rm) ? mov.w @rm,rn 0110nnnnmmmm0001 (rm) ? mov.l @rm,rn 0110nnnnmmmm0010 (rm) ? mov.b rm,@?rn 0010nnnnmmmm0100 rn ? 1 ? mov.w rm,@?rn 0010nnnnmmmm0101 rn ? 2 ? mov.l rm,@?rn 0010nnnnmmmm0110 rn ? 4 ? mov.b @rm+,rn 0110nnnnmmmm0100 (rm) ? mov.w @rm+,rn 0110nnnnmmmm0101 (rm) ? mov.l @rm+,rn 0110nnnnmmmm0110 (rm) ? mov.b r0,@(disp,rn) 10000000nnnndddd r0 ? mov.w r0,@(disp,rn) 10000001nnnndddd r0 ? mov.l rm,@(disp,rn) 0001nnnnmmmmdddd rm ? mov.b @(disp,rm),r0 10000100mmmmdddd (disp + rm) ? mov.w @(disp,rm),r0 10000101mmmmdddd (disp ? mov.l @(disp,rm),rn 0101nnnnmmmmdddd (disp ? mov.b rm,@(r0,rn) 0000nnnnmmmm0100 rm ?
rev. 3.0, 09/04, page 49 of 1086 table 2.12 data transfer instructions (cont) instruction instruction code operation execu- tion cycles t bit mov.w rm,@(r0,rn) 0000nnnnmmmm0101 rm ? mov.l rm,@(r0,rn) 0000nnnnmmmm0110 rm ? mov.b @(r0,rm),rn 0000nnnnmmmm1100 (r0 + rm) ? mov.w @(r0,rm),rn 0000nnnnmmmm1101 (r0 + rm) ? mov.l @(r0,rm),rn 0000nnnnmmmm1110 (r0 + rm) ? mov.b r0,@(disp,gbr) 11000000dddddddd r0 ? mov.w r0,@(disp,gbr) 11000001dddddddd r0 ? mov.l r0,@(disp,gbr) 11000010dddddddd r0 ? mov.b @(disp,gbr),r0 11000100dddddddd (disp + gbr) ? mov.w @(disp,gbr),r0 11000101dddddddd (disp ? mov.l @(disp,gbr),r0 11000110dddddddd (disp ? mova @(disp,pc),r0 11000111dddddddd disp ? movt rn 0000nnnn00101001 t ? swap.b rm,rn 0110nnnnmmmm1000 rm ? swap.w rm,rn 0110nnnnmmmm1001 rm ? xtrct rm,rn 0010nnnnmmmm1101 rm: middle 32 bits of rn ?
rev. 3.0, 09/04, page 50 of 1086 table 2.13 arithmetic operation instructions instruction instruction code operation execu- tion cycles t bit add rm,rn 0011nnnnmmmm1100 rn + rm ? add #imm,rn 0111nnnniiiiiiii rn + imm ? addc rm,rn 0011nnnnmmmm1110 rn + rm + t addv rm,rn 0011nnnnmmmm1111 rn + rm cmp/eq #imm,r0 10001000iiiiiiii if r0 = imm, 1 cmp/eq rm,rn 0011nnnnmmmm0000 if rn = rm, 1 cmp/hs rm,rn 0011nnnnmmmm0010 if rn=rm with unsigned data, 1 cmp/ge rm,rn 0011nnnnmmmm0011 if rn = rm with signed data, 1 cmp/hi rm,rn 0011nnnnmmmm0110 if rn > rm with unsigned data, 1 cmp/gt rm,rn 0011nnnnmmmm0111 if rn > rm with signed data, 1 cmp/pl rn 0100nnnn00010101 if rn > 0, 1 cmp/pz rn 0100nnnn00010001 if rn = 0, 1 cmp/str rm,rn 0010nnnnmmmm1100 if rn and rm have an equivalent byte, 1 div1 rm,rn 0011nnnnmmmm0100 single-step division (rn rm) 1 calculation result div0s rm,rn 0010nnnnmmmm0111 msb of rn div0u 0000000000011001 0
rev. 3.0, 09/04, page 51 of 1086 table 2.13 arithmetic operation instructions (cont) instruction instruction code operation execu- tion cycles t bit dmuls.l rm,rn 0011nnnnmmmm1101 signed operation of rn * ? dmulu.l rm,rn 0011nnnnmmmm0101 unsigned operation of rn * ? dt rn 0100nnnn00010000 rn ? 1 exts.b rm,rn 0110nnnnmmmm1110 byte in rm is sign- extended ? exts.w rm,rn 0110nnnnmmmm1111 word in rm is sign- extended ? extu.b rm,rn 0110nnnnmmmm1100 byte in rm is zero- extended ? extu.w rm,rn 0110nnnnmmmm1101 word in rm is zero- extended ? mac.l @rm+,@rn+ 0000nnnnmmmm1111 signed operation of (rn) + * ? mac.w @rm+,@rn+ 0100nnnnmmmm1111 signed operation of (rn) * ? mul.l rm,rn 0000nnnnmmmm0111 rn * ? muls.w rm,rn 0010nnnnmmmm1111 signed operation of rn * ? mulu.w rm,rn 0010nnnnmmmm1110 unsigned operation of rn * ? neg rm,rn 0110nnnnmmmm1011 0 ? rm ? negc rm,rn 0110nnnnmmmm1010 0 ? rm ? t
rev. 3.0, 09/04, page 52 of 1086 table 2.13 arithmetic operation instructions (cont) instruction instruction code operation execu- tion cycles t bit sub rm,rn 0011nnnnmmmm1000 rn ? rm ? subc rm,rn 0011nnnnmmmm1010 rn ? rm ? t subv rm,rn 0011nnnnmmmm1011 rn ? rm * the normal minimum number of execution cycles. (the number in parentheses is the number of cycles when there is contention with following instructions.) table 2.14 logic operation instructions instruction instruction code operation execu- tion cycles t bit and rm,rn 0010nnnnmmmm1001 rn & rm ? and #imm,r0 11001001iiiiiiii r0 & imm ? and.b #imm,@(r0,gbr) 11001101iiiiiiii (r0 + gbr) & imm ? not rm,rn 0110nnnnmmmm0111 ~rm ? or rm,rn 0010nnnnmmmm1011 rn | rm ? or #imm,r0 11001011iiiiiiii r0 | imm ? or.b #imm,@(r0,gbr) 11001111iiiiiiii (r0 + gbr) | imm ? tas.b @rn 0100nnnn00011011 if (rn) is 0, 1 tst rm,rn 0010nnnnmmmm1000 rn & rm; if the result is 0, 1 tst #imm,r0 11001000iiiiiiii r0 & imm; if the result is 0, 1 tst.b #imm,@(r0,gbr) 11001100iiiiiiii (r0 + gbr) & imm; if the result is 0, 1 xor rm,rn 0010nnnnmmmm1010 rn ^ rm ? xor #imm,r0 11001010iiiiiiii r0 ^ imm ? xor.b #imm,@(r0,gbr) 11001110iiiiiiii (r0 + gbr) ^ imm ?
rev. 3.0, 09/04, page 53 of 1086 table 2.15 shift instructions instruction instruction code operation execu- tion cycles t bit rotl rn 0100nnnn00000100 t rotr rn 0100nnnn00000101 lsb rotcl rn 0100nnnn00100100 t rotcr rn 0100nnnn00100101 t shal rn 0100nnnn00100000 t shar rn 0100nnnn00100001 msb shll rn 0100nnnn00000000 t shlr rn 0100nnnn00000001 0 shll2 rn 0100nnnn00001000 rn<<2 ? shlr2 rn 0100nnnn00001001 rn>>2 ? shll8 rn 0100nnnn00011000 rn<<8 ? shlr8 rn 0100nnnn00011001 rn>>8 ? shll16 rn 0100nnnn00101000 rn<<16 ? shlr16 rn 0100nnnn00101001 rn>>16 ?
rev. 3.0, 09/04, page 54 of 1086 table 2.16 branch instructions instruction instruction code operation execu- tion cycles t bit bf label 10001011dddddddd if t = 0, disp * ? bf/s label 10001111dddddddd delayed branch, if t = 0, disp * ? bt label 10001001dddddddd if t = 1, disp * ? bt/s label 10001101dddddddd delayed branch, if t = 1, disp * ? bra label 1010dddddddddddd delayed branch, disp ? braf rm 0000mmmm00100011 delayed branch, rm + pc ? bsr label 1011dddddddddddd delayed branch, pc ? bsrf rm 0000mmmm00000011 delayed branch, pc ? jmp @rm 0100mmmm00101011 delayed branch, rm ? jsr @rm 0100mmmm00001011 delayed branch, pc ? rts 0000000000001011 delayed branch, pr ? note: * one state when the program does not branch.
rev. 3.0, 09/04, page 55 of 1086 table 2.17 system control instructions instruction instruction code operation execu- tion cycles t bit clrt 0000000000001000 0 clrmac 0000000000101000 0 ? ldc rm,sr 0100mmmm00001110 rm ldc rm,gbr 0100mmmm00011110 rm ? ldc rm,vbr 0100mmmm00101110 rm ? ldc.l @rm+,sr 0100mmmm00000111 (rm) ldc.l @rm+,gbr 0100mmmm00010111 (rm) ? ldc.l @rm+,vbr 0100mmmm00100111 (rm) ? lds rm,mach 0100mmmm00001010 rm ? lds rm,macl 0100mmmm00011010 rm ? lds rm,pr 0100mmmm00101010 rm ? lds.l @rm+,mach 0100mmmm00000110 (rm) ? lds.l @rm+,macl 0100mmmm00010110 (rm) ? lds.l @rm+,pr 0100mmmm00100110 (rm) ? nop 0000000000001001 no operation 1 ? rte 0000000000101011 delayed branch, stack area ? sett 0000000000011000 1 sleep 0000000000011011 sleep 3 * ? stc sr,rn 0000nnnn00000010 sr ? stc gbr,rn 0000nnnn00010010 gbr ? stc vbr,rn 0000nnnn00100010 vbr ? stc.l sr,@?rn 0100nnnn00000011 rn ? 4 ? stc.l gbr,@?rn 0100nnnn00010011 rn ? 4 ? stc.l vbr,@?rn 0100nnnn00100011 rn ? 4 ? sts mach,rn 0000nnnn00001010 mach ? sts macl,rn 0000nnnn00011010 macl ? sts pr,rn 0000nnnn00101010 pr ?
rev. 3.0, 09/04, page 56 of 1086 table 2.17 system control instructions (cont) instruction instruction code operation execu- tion cycles t bit sts.l mach,@?rn 0100nnnn00000010 rn ? 4 ? sts.l macl,@?rn 0100nnnn00010010 rn ? 4 ? sts.l pr,@?rn 0100nnnn00100010 rn ? 4 ? trapa #imm 11000011iiiiiiii pc/sr ? note: * the number of execution cycles before the chip enters sleep mode: the execution cycles shown in the table are minimums. the actual number of cycles may be increased when (1) contention occurs between instruction fetches and data access, or (2) when the destination register of the load instruction (memory
rev. 3.0, 09/04, page 57 of 1086 table 2.18 floating-point instructions instruction instruction code operation execu- tion cycles t bit fabs frn 1111nnnn01011101 |frn| ? fadd frm,frn 1111nnnnmmmm0000 frn + frm ? fcmp/eq frm,frn 1111nnnnmmmm0100 (frn = frm)? 1:0 fcmp/gt frm,frn 1111nnnnmmmm0101 (frn > frm)? 1:0 fdiv frm,frn 1111nnnnmmmm0011 frn/frm ? fldi0 frn 1111nnnn10001101 0x00000000 ? fldi1 frn 1111nnnn10011101 0x3f800000 ? flds frm,fpul 1111mmmm00011101 frm ? float fpul,frn 1111nnnn00101101 (float) fpul ? fmac fr0,frm,frn 1111nnnnmmmm1110 fr0 ? fmov frm, frn 1111nnnnmmmm1100 frm ? fmov.s @(r0,rm),frn 1111nnnnmmmm0110 (r0 + rm) ? fmov.s @rm+,frn 1111nnnnmmmm1001 (rm) ? fmov.s @rm,frn 1111nnnnmmmm1000 (rm) ? fmov.s frm,@(r0,rn) 1111nnnnmmmm0111 frm ? fmov.s frm,@-rn 1111nnnnmmmm1011 rn ? = 4, frm ? fmov.s frm,@rn 1111nnnnmmmm1010 frm ? fmul frm,frn 1111nnnnmmmm0010 frn ? fneg frn 1111nnnn01001101 ? frn ? fsts fpul,frn 1111nnnn00001101 fpul ? fsub frm,frn 1111nnnnmmmm0001 frn ? frm ? ftrc frm,fpul 1111mmmm00111101 (long) frm ?
rev. 3.0, 09/04, page 58 of 1086 table 2.19 fpu-related cpu instructions instruction instruction code operation execu- tion cycles t bit lds rm,fpscr 0100mmmm01101010 rm ? lds rm,fpul 0100mmmm01011010 rm ? lds.l @rm+, fpscr 0100mmmm01100110 @rm ? lds.l @rm+, fpul 0100mmmm01010110 @rm ? sts fpscr, rn 0000nnnn01101010 fpscr ? sts fpul,rn 0000nnnn01011010 fpul ? sts.l fpscr,@-rn 0100nnnn01100010 rn ? = 4, fpcsr ? sts.l fpul,@-rn 0100nnnn01010010 rn ? = 4, fpul ? 2.5 processing states 2.5.1 state transitions the cpu has five processing states: power-on reset, exception processing, bus release, program execution and power-down. figure 2.8 shows the transitions between the states.
rev. 3.0, 09/04, page 59 of 1086 power-on reset state sleep mode software standby mode hardware standby mode program execution state bus release state exception processing state = 1 when an interrupt source or dma address error occurs nmi interrupt source occurs exception processing ends bus request generated exception processing source occurs bus request cleared bus request generated bus request cleared sby bit cleared for sleep instruction sby bit set for sleep instruction from any state when = 0 and = 1 = 0 = 1 power-down state from any state when = 0 and = 0 bus request generated bus request cleared note: an internal reset due to the wdt causes a transition from the program execution state or sleep mode to the exception processing state. figure 2.8 transitions between processing states
rev. 3.0, 09/04, page 60 of 1086 power-on reset state : the cpu resets in the reset state. when the hstby pin is driven high and the res pin level goes low, the power-on reset state is entered. exception processing state : the exception processing state is a transient state that occurs when exception processing sources such as resets or interrupts alter the cpu ? s processing state flow. for a reset, the initial values of the program counter (pc) (execution start address) and stack pointer (sp) are fetched from the exception processing vector table and stored; the cpu then branches to the execution start address and execution of the program begins. for an interrupt, the stack pointer (sp) is accessed and the program counter (pc) and status register (sr) are saved to the stack area. the exception service routine start address is fetched from the exception processing vector table; the cpu then branches to that address and the program starts executing, thereby entering the program execution state. program execution state : in the program execution state, the cpu sequentially executes the program. power-down state : in the power-down state, the cpu operation halts and power consumption declines. the sleep instruction places the cpu in the sleep mode or the software standby mode. if the hstby pin is driven low when the res pin is low, the cpu will enter the hardware standby mode. bus release state : in the bus release state, the cpu releases access rights to the bus to the device that has requested them.
rev. 3.0, 09/04, page 61 of 1086 section 3 floating-point unit (fpu) 3.1 overview the sh7058 has an on-chip floating-point unit (fpu), the fpu?s register configuration is shown in figure 3.1. 31 0 fr0 floating-point registers fr1 fr2 fr3 fr4 fr5 fr6 fr7 fr8 fr9 fr10 fr11 fr12 fr13 fr14 fr15 floating-point system registers 31 0 floating-point communication register specifies buffer as communication register between cpu and fpu * . fpul 31 0 floating-point status/control register indicates status/control information relating to fpu exceptions * . fpscr note: * for details, see section 3.2, floating-point registers and floating-point system registers. fr0 functions as the index register for the fmac instruction. figure 3.1 overview of register configuration (floating-point registers and floating-point system registers)
rev. 3.0, 09/04, page 62 of 1086 3.2 floating-point registers and floating-point system registers 3.2.1 floating-point register file the sh7058 has sixteen 32-bit single-precision floating-point registers. register specifications are always made as 4 bits. in assembly language, the floating-point registers are specified as fr0, fr1, fr2, and so on. fr0 functions as the index register for the fmac instruction. 3.2.2 floating-point communication register (fpul) information for transfer between the fpu and the cpu is transferred via the fpul communication register, which resembles macl and mach in the integer unit. the sh7058 is provided with this communication register since the integer and floating-point formats are different. the 32-bit fpul is a system register, and is accessed by the cpu by means of lds and sts instructions. 3.2.3 floating-point status/control register (fpscr) the sh7058 has a floating-point status/control register (fpscr) that functions as a system register accessed by means of lds and sts instructions (figure 3.2). fpscr can be written to by a user program. this register is part of the process context, and must be saved when the context is switched. it may also be necessary to save this register when a procedure call is made. fpscr is a 32-bit register that controls the storage of detailed information relating to the rounding mode, asymptotic underflow (denormalized numbers), and fpu exceptions. the module stop bit that disables the fpu itself is provided in the module standby control register (mstcr). for details, see section 25, power-down state. after a reset start, the fpu is enabled. table 3.1 shows the flags corresponding the five kinds of fpu exception. a sixth flag is also provided as an fpu error flag that indicates an floating-point unit error state not covered by the other five flags. table 3.1 floating-point exception flags flag meaning support in sh7058 e fpu error ? v invalid operation yes z division by zero yes o overflow (value not expressed) ? u underflow (value not expressed) ? i inexact (result not expressed) ?
rev. 3.0, 09/04, page 63 of 1086 the bits in the cause field indicate the exception cause for the instruction executing at the time. the cause bits are modified by a floating-point instruction. these bits are set to 1 or cleared to 0 according to whether or not an exception state occurred during execution of a single instruction. the bits in the enable field specify the kinds of exception to be enabled, allowing the flow to be changed to exception processing. if the cause bit corresponding to an enable bit is set by the currently executing instruction, an exception occurs. the bits in the flag field are used to keep a tally of all exceptions that occur during a series of instructions. once one of these bits is set by an instruction, it is not reset by a subsequent instruction. the bits in this field can only be reset by the explicit execution of a store operation on fpscr.
rev. 3.0, 09/04, page 64 of 1086 31 19 rm dn ce reserved flag field enable field cause field 97 2 5 6 10 11 15 16 17 18 410 14 12 3 13 8 cz cv cu ci co ev ez eo eu ei fv fz fo fu fi dn: denormalized bit in the sh7058 this bit is always set to 1, and the source or destination operand of a denormalized number is 0. this bit cannot be modified even by an lds instruction. cv: invalid operation cause bit when 1: indicates that an invalid operation exception occurred during execution of the current instruction. when 0: indicates that an invalid operation exception has not occurred. cz: division-by-zero cause bit when 1: indicates that a division-by-zero exception occurred during execution of the current instruction. when 0: indicates that a division-by-zero exception has not occurred. ev: invalid operation exception enable when 1: enables invalid operation exception generation. when 0: an invalid operation exception is not generated, and a qnan is returned as the result. ez: division-by-zero exception enable when 1: enables exception generation due to division-by-zero during execution of the current instruction. when 0: a division-by-zero exception is not generated, and infinity with the sign (+ or ) of the current expression is returned as the result. fv: invalid operation exception flag bit when 1: indicates that an invalid operation exception occurred during instruction execution. when 0: indicates that an invalid operation exception has not occurred. fz: division-by-zero exception flag bit when 1: indicates that a division-by-zero exception occurred during instruction execution. when 0: indicates that a division-by-zero exception has not occurred. rm: rounding bit. in the sh7058, the value of these bits is always 01, meaning that rounding to zero (rz mode) is being used. these bits cannot be modified even by an lds instruction. in the sh7058, the cause field eoui bits (ce, co, cu, and ci), enable field oui bits (eo, eu, and ei), and flag field oui bits (fo, fu, and fi), and the reserved area, are preset to 0, and cannot be modified even by using an lds instruction. figure 3.2 floating-point status/control register
rev. 3.0, 09/04, page 65 of 1086 3.3 floating-point format 3.3.1 floating-point format the sh7058 supports single-precision floating-point operations, and fully complies with the ieee754 floating-point standard. a floating-point number consists of the following three fields: ? sign (s) ? exponent (e) ? fraction (f) the exponent is expressed in biased form, as follows: e = e + bias the range of unbiased exponent e is e min ? 1 to e max + 1. the two values e min ? 1 and e max + 1 are distinguished as follows. e min ? 1 indicates zero (both positive and negative sign) and a denormalized number, and e max + 1 indicates positive or negative infinity or a non-number (nan). in a single-precision operation, the bias value is 127, e min is ?126, and e max is 127. 31 se f 30 23 22 0 figure 3.3 floating-point number format floating-point number value v is determined as follows: if e = e max + 1 and f! = 0, v is a non-number (nan) irrespective of sign s if e = e max + 1 and f = 0, v = (-1) s (infinity) [positive or negative infinity] if e min <= e <= e max , v = (-1) s 2 e (1.f) [normalized number] if e = e min ? 1 and f! = 0, v = (-1) s 2 emin (0.f) [denormalized number] if e = e min ? 1 and f = 0, v = (-1) s 0 [positive or negative zero]
rev. 3.0, 09/04, page 66 of 1086 3.3.2 non-numbers (nan) with non-number (nan) representation in a single-precision operation value, at least one of bits 22 to 0 is set. if bit 22 is set, this indicates a signaling nan (snan). if bit 22 is reset, the value is a quiet nan (qnan). the bit pattern of a non-number (nan) is shown in the figure below. bit n in the figure is set for a signaling nan and reset for a quiet nan. x indicates a don?t care bit (with the proviso that at least one of bits 22 to 0 is set). in a non-number (nan), the sign bit is a don?t care bit. 31 x 11111111 nxxxxxxxxxxxxxxxxxxxxxx 30 23 22 0 n = 1: snan n = 0: qnan figure 3.4 nan bit pattern if a non-number (snan) is input in an operation that generates a floating-point value: ? when the ev bit in the fpscr register is reset, the operation result (output) is a quiet nan (qnan). ? when the ev bit in the fpscr register is set, an invalid operation exception will be generated. in this case, the contents of the operation destination register do not change. if a quiet nan is input in an operation that generates a floating-point value, and a signaling nan has not been input in that operation, the output will always be a quiet nan irrespective of the setting of the ev bit in the fpscr register. an exception will not be generated in this case. refer to the sh-2e programming manual for details of floating-point operations when a non- number (nan) is input. 3.3.3 denormalized number values for a denormalized number floating-point value, the biased exponent is expressed as 0, the fraction as a non-zero value, and the hidden bit as 0. in the sh7058?s floating-point unit, a denormalized number (operand source or operation result) is always flushed to 0 in a floating- point operation that generates a value (an operation other than copy).
rev. 3.0, 09/04, page 67 of 1086 3.3.4 other special values floating-point value representations include the seven different kinds of special values shown in table 3.2. table 3.2 representation of special values in single-precision floating-point operations specified by ieee754 standard value representation +0.0 0x00000000 ?0.0 0x80000000 denormalized number as described in section 3.3.3, denormalized number values +inf 0x7f800000 ?inf 0xff800000 qnan (quiet nan) as described in section 3.3.2, non-numbers (nan) snan (signaling nan) as described in section 3.3.2, non-numbers (nan)
rev. 3.0, 09/04, page 68 of 1086 3.4 floating-point exception model 3.4.1 enable state exceptions invalid operation and division-by-zero exceptions are both placed in the enable state by setting the enable bit. all exceptions generated by the fpu are mapped as the same exception event. the meaning of a particular exception is determined by software by reading system register fpscr and analyzing the information held there. 3.4.2 disable state exceptions if the ev enable bit is not set, a qnan will be generated as the result of an invalid operation (except for fcmp and ftrc). if the ez enable bit is not set, division-by-zero will return infinity with the sign (+ or ?) of the current expression. overflow will generate a finite number which is the largest value that can be expressed by an absolute value in the format, with the correct sign. underflow will generate zero with the correct sign. if the operation result is inexact, the destination register will store that inexact result. 3.4.3 fpu exception event and code all fpu exceptions have a vector table address offset in address h'00000034 as the same general exception event; that is, an fpu exception. 3.4.4 floating-point data arrangement in memory single-precision floating-point data is located in memory at a 4-byte boundary; that is, it is arranged in the same form as an sh7058 long integer. 3.4.5 arithmetic operations involving special operands all arithmetic operations involving special operands (qnan, snan, +inf, ?inf, +0, ?0) comply with the specifications of the ieee754 standard. refer to the sh-2e programming manual for details.
rev. 3.0, 09/04, page 69 of 1086 3.5 synchronization with cpu synchronization with cpu: floating-point instructions and cpu instructions are executed in turn, according to their order in the program, but in some cases operations may not be completed in the program order due to a difference in execution cycles. when a floating-point instruction accesses only fpu resources, there is no need for synchronization with the cpu, and a cpu instruction following an fpu instruction can finish its operation before completion of the fpu operation. consequently, in an optimized program, it is possible to effectively conceal the execution cycle of a floating-point instruction that requires a long execution cycle, such as a divide instruction. on the other hand, a floating-point instruction that accesses cpu resources, such as a compare instruction, must be synchronized to ensure that the program order is observed. floating-point instructions that require synchronization: load, store, and compare instructions, and instructions that access the fpul or fpscr register, must be synchronized because they access cpu resources. load and store instructions access a general register. post- increment load and pre-decrement store instructions change the contents of a general register. a compare instruction modifies the t bit. an fpul or fpscr access instruction references or changes the contents of the fpul or fpscr register. these references and changes must all be synchronized with the cpu.
rev. 3.0, 09/04, page 70 of 1086 3.6 usage notes of the arithmetic operations that come up with special operand in this fpu, the following two patterns generate values whose sign is different from that defined in ieee754 standard. (1) fadd frm, frn frm = ?inf (0xff800000) frn = max (0x7f7fffff) in this case, although the expectation value in ieee754 is ?inf (0xff800000), the result is +inf (0xff800000). (2) fsub frm, frn frm = +inf (0x7f800000) frn = max (0x7f7fffff) in this case, although the expectation value in ieee754 is ?inf (0xff800000), the result is +inf (0x7f800000).
rev. 3.0, 09/04, page 71 of 1086 section 4 operating modes 4.1 operating mode selection the sh7058 has five operating modes that are selected by pins md2 to md0 and fwe. the mode setting pins should not be changed during operation of the sh7058, and only the setting combinations shown in table 4.1 should be used. the pv cc 1 power supply voltage must be within the range shown in table 4.1. table 4.1 operating mode selection operating pin settings on-chip area 0 bus mode no. fwe md2 md1 md0 mode name rom width pv cc 1 voltage mode 0 0 1 0 0 8 bits mode 1 0 1 0 1 disabled 16 bits mode 2 0 1 1 0 mcu expanded mode enabled set by bcr1 3.3 v 0.3 v mode 3 0 1 1 1 mcu single-chip mode enabled ? 5.0 v 0.5 v mode 4 1 1 0 0 set by bcr1 3.3 v 0.3 v mode 5 1 1 0 1 boot mode enabled ? 5.0 v 0.5 v mode 6 1 1 1 0 set by bcr1 3.3 v 0.3 v mode 7 1 1 1 1 user program mode enabled ? 5.0 v 0.5 v mode 8 1 0 0 0 set by bcr1 3.3 v 0.3 v mode 9 1 0 0 1 user boot mode enabled ? 5.0 v 0.5 v ? 0/1 0 1 1 programmer mode ? ? 3.3 v 0.3 v there are two mcu operating modes: mcu single-chip mode and mcu expanded mode. modes in which the flash memory can be programmed are boot mode, user boot mode and user program mode (the two on-board programming modes) and programmer mode in which programming is performed with an eprom programmer (a type which supports programming of this device). for details, see section 23, rom.
rev. 3.0, 09/04, page 72 of 1086
rev. 3.0, 09/04, page 73 of 1086 section 5 clock pulse generator (cpg) 5.1 overview the clock pulse generator (cpg) supplies clock pulses inside the sh7058 chip and to external devices. the sh7058 cpg consists of an oscillator circuit and a pll multiplier circuit. there are two methods of generating a clock with the cpg: by connecting a crystal resonator, or by inputting an external clock. the oscillator circuit oscillates at the same frequency as the input clock. two types of clock signals, internal clock ( ) and peripheral clock (p ) signals, are supplied and used by the sh7058. the internal clock signal ( ), with frequency either four or eight times the frequency of the clock signal input from the extal pin, is mainly supplied to the bus master modules. the peripheral clock signal (p ), with frequency two times the frequency of the clock signal input from the extal pin, is mainly supplied to the on-chip peripheral modules. the ck pin outputs the peripheral clock signal (p ). the cpg is halted in software standby mode and hardware standby mode. 5.1.1 block diagram a block diagram of the clock pulse generator is shown in figure 5.1. extal xtal pllvss pllvcc pllcap ck pin (system clock) peripheral clock (p ) internal clock ( ) 2 4 or 8 oscillator circuit oscillation stop detection circuit on-chip oscillator circuit pll multiplier circuit syscr1 cpg figure 5.1 block diagram of clock pulse generator
rev. 3.0, 09/04, page 74 of 1086 5.1.2 pin configuration the pins relating to the clock pulse generator are shown in table 5.1. table 5.1 cpg pins pin name abbreviation i/o description external clock extal input crystal oscillator or external clock input crystal xtal input crystal oscillator connection system clock ck output system clock output pll power supply pllv cc input pll multiplier circuit power supply pll ground pllv ss input pll multiplier circuit ground pll capacitance pllcap input pll multiplier circuit oscillation external capacitance pin 5.1.3 related register the register relating to the clock pulse generator is shown in table 5.2. table 5.2 cpg register address name abbreviation r/w initial value write read access size system control register 2 syscr2 r/w h'01 h'fffff70a * 1 h'fffff70b * 2 8, 16 notes: 1. data should be written in words; data cannot be written in bytes or longwords. 2. data should be read in bytes; correct data cannot be read in words or longwords. 5.2 frequency ranges and clock selection 5.2.1 frequency ranges the input frequency and operating frequency ranges are shown in table 5.3.
rev. 3.0, 09/04, page 75 of 1086 table 5.3 input frequency and operating frequency input frequency range (mhz) pll multiplication factor internal clock ( ) frequency range (mhz) peripheral clock (p ) frequency range (mhz) system clock frequency range (mhz) 4 20 to 40 10 to 20 10 to 20 5 to 10 8 40 to 80 note: crystal oscillator and external clock input two types of clock signals, internal clock ( ) and peripheral clock (p ) signals, are supplied and used by the sh7058. the internal clock signal ( ), with frequency either four or eight times the frequency of the clock signal input from the extal pin, is mainly supplied to the bus master modules such as cpu, fpu, and dmac. the peripheral clock signal (p ), with frequency two times the frequency of the clock signal input from the extal pin, is mainly supplied to the on-chip peripheral modules. the ck pin outputs the peripheral clock signal (p ) signal as the system clock signal. input clock (extal pin) system clock (ck pin) internal clock ( ) peripheral clock (p ) internal clock ( ) = input clock 4 internal clock ( ) = input clock 8 note: since the input clock signal is multiplied by the pll multiplier circuit, the phase relationships between the input clock signal and the other clock signals are not determined uniformly. figure 5.2 frequencies and phases of clock signals 5.2.2 clock selection the frequency of the internal clock signal ( ) can be either four or eight times the frequency of the input clock signal (extal pin), and the frequency can be selected via the cksel bit in system control register 2 (syscr2).
rev. 3.0, 09/04, page 76 of 1086 system control register 2 (syscr2) bit: 76543210 cksel ? ? ? mstop3 mstop2 mstop1 mstop0 initial value:00000001 r/w: r/w r r r r/w r/w r/w r/w system control register 2 (syscr2) is an 8-bit readable/writable register that selects the internal clock signal ( ) and controls the standby state of the aud, h-udi, fpu, and ubc. syscr2 is initialized to h?01 by a power-on reset. bit 7?internal clock ( ) select (cksel): selects the frequency of the internal clock signal ( ). when writing to this bit, follow the procedure below. 1. halt the dmac and aud (do not allow a bus cycle to be generated for the dmac or aud immediately after writing to this register). however, the aud does not need to be halted during aud branch trace. 2. disable interrupts. 3. place four nop instructions after writing to this bit. bit 7: cksel description 0 frequency of internal clock signal ( ) is four times the input clock frequency (initial value) 1 frequency of internal clock signal ( ) is eight times the input clock frequency for bits 6 to 0, see section 25, power-down state. 5.2.3 notes on register access the method of writing to system control register 2 (syscr2) is different from that of ordinary registers to prevent inadvertent rewriting. be certain to use a word transfer instruction when writing data to syscr2. data cannot be written by a byte transfer instruction. as shown in figure 5.3, set the upper byte to h'3c and transfer data using the lower byte as write data. data can be read by the same method as for ordinary registers. syscr2 is allocated to address h'fffff70a. always use a byte transfer instruction to read data.
rev. 3.0, 09/04, page 77 of 1086 15 8 7 0 h'3c write data address: when writing to syscr2 h'fffff70a figure 5.3 writing to syscr2 5.3 clock source clock pulses can be supplied from a connected crystal oscillator or an external clock. 5.3.1 connecting a crystal oscillator circuit configuration: figure 5.4 shows an example of connecting a crystal oscillator. use the damping resistance (rd) shown in table 5.4. an at-cut parallel-resonance type crystal oscillator should be used. load capacitors (cl1, cl2) must be connected as shown in the figure. the clock pulses generated by the crystal oscillator and internal oscillator are sent to the pll multiplier circuit, where a multiplied frequency is selected and supplied inside the sh7058 chip and to external devices. the crystal oscillator manufacturer should be consulted concerning the compatibility between the crystal oscillator and the chip. xtal extal cl2 cl1 rd cl1 = cl2 = 18 to 22 pf figure 5.4 connection of crystal oscillator (example) table 5.4 damping resistance values (recommended values) frequency (mhz) parameter 5 10 rd ( ? ) 500 0
rev. 3.0, 09/04, page 78 of 1086 crystal oscillator: figure 5.5 shows an equivalent circuit of the crystal oscillator. use a crystal oscillator with the characteristics listed in table 5.5. co extal cl lrs xtal figure 5.5 crystal oscillator equivalent circuit table 5.5 crystal oscillator parameters (recommended values) frequency (mhz) parameter 5 10 rs max ( ? ) 100 50 co max (pf) 7 7 the crystal oscillator manufacturer should be consulted concerning the compatibility between the crystal oscillator and the chip. 5.3.2 external clock input method an example of external clock input connection is shown in figure 5.6. when the xtal pin is placed in the open state, the parasitic capacitance should be 10 pf or less. even when an external clock is input, provide for a wait of at least the oscillation settling time when powering on or exiting standby mode in order to secure the pll settling time. xtal extal open external clock input figure 5.6 external clock input method (example)
rev. 3.0, 09/04, page 79 of 1086 5.4 oscillation stop detection function 5.4.1 overview the oscillation stop detection circuit detects errors in the crystal oscillator and sets flags in internal peripheral registers. to make this function effective, the inosce bit in syscr1 needs to be set to 1 (initial value: 0). if the crystal oscillator performs abnormal operation, such as oscillation stop, for some reason or other, the oscstop bit in syscr1 is set to 1 (initial value: 0). in addition, the lsi shuts off clocks from the crystal oscillator and continues to operate by using clocks from the on-chip oscillator circuit. if abnormal operation of the crystal oscillator is detected once, the status is retained until the next reset is released or software standby is released. when this function of oscillation stop detection is made ineffective (the inosce bit in syscr1 is set to 0), abnormal operations of the crystal oscillator are not detected. switchover to on-chip oscillation does not take place, either. 5.4.2 settings of oscillation stop detection function to make the oscillation stop detection function effective, the inosce bit in syscr1 needs to be set to 1 (initial value: 0). the inosce bit in syscr1 is always cleared to 0 after reset or software standby is released. to make this function effective, make sure to set the inosce bit to 1 after reset or software standby is released. while the oscillation stop detection function is made effective, if the clocks from the crystal oscillator are not supplied for a certain period (see table 5.6), the status is determined as abnormal operation of the crystal oscillator and the lsi starts to use the clocks from the on-chip oscillator circuit (see table 5.7). in this case, the lsi sets the oscstop bit in syscr1 to 1 (initial value: 0). once switchover to on-chip oscillation takes place, operation by on-chip oscillation continues even if the crystal oscillator performs normally afterwards. to use the clocks from the crystal oscillator, perform reset start again.
rev. 3.0, 09/04, page 80 of 1086 internal clock ( ) peripheral clock (p ) on-chip oscillation oscillator tdr oscstop on-chip oscillation operation normal operation figure 5.7 oscillation stop detection timing table 5.6 abnormal operation detection with oscillation stop detection circuit min typ max precaution detection time (tdr) ?? 1.0 (ms) as the capability, it ranges from about 30 to 20 s. table 5.7 frequencies of on-chip oscillator circuit (internal clock frequency) min typ max precaution internal clock frequency (for multiplication by 8) 10m(hz) 30m(hz) 40m(hz) on-chip oscillation frequency differs depending on temperature and operation voltage. internal clock frequency (for multiplication by 4) 5m(hz) 15m(hz) 20m(hz) on-chip oscillation frequency differs depending on temperature and operation voltage.
rev. 3.0, 09/04, page 81 of 1086 5.4.3 related register register bits relating to the oscillation stop detection function are mapped to bits 7 and 6 in the syscr1 register. bit: 76543210 oscstop inosce audsrst rame initial value:00000000 r/w: rr/wrrrrr/wr/w bit 7: crystal oscillator abnormal detection (oscstop) table 5.8 description on oscstop bit bit 7 oscstop description 0 normal operation of crystal oscillator 1 detection of abnormal operation of crystal oscillator and supply of clocks from the on-chip oscillator circuit bit 6: oscillation stop detection function enable (inosec) table 5.9 description on inosce bit bit 6 inosce description 0 enables detection function of abnormal operation of the crystal oscillator. 1 disables detection function of abnormal operation of the crystal oscillator. bits 5 to 0: see section 25, power -down state. 5.4.4 precautions for performing oscillation stop detection function in the status where the on-chip oscillation is used due to abnormal operation of the crystal oscillator, do not disable the oscillation stop detection function (by clearing the inosce bit to 0). if the oscillation stop detection function is disabled, this lsi's operation is not guaranteed.
rev. 3.0, 09/04, page 82 of 1086 5.5 usage notes notes on board design: place the crystal oscillator and its load capacitors as close as possible to the xtal and extal pins. to prevent induction from interfering with correct oscillation, do not allow any signal lines to cross the xtal or extal lines (figure 5.8). crossing of signal lines prohibited cl1 xtal extal cl2 figure 5.8 precautions for oscillator circuit system board design pll oscillation power supply: separate pllv cc and pllv ss from the other v cc and v ss lines at the board power supply source, and be sure to insert bypass capacitors c pb and c b close to the pins. pllcap pllv cc pllv ss v cc v ss recommended values c pb , c b : 0.1f rp: 200 c pb c b rp figure 5.9 points for caution in pll power supply connection
rev. 3.0, 09/04, page 83 of 1086 pllv ss pllcap xtal extal pllv cc v cc v ss figure 5.10 actual example of board design
rev. 3.0, 09/04, page 84 of 1086
rev. 3.0, 09/04, page 85 of 1086 section 6 exception processing 6.1 overview 6.1.1 types of exception processing and priority exception processing is started by four sources: resets, address errors, interrupts and instructions and have the priority shown in table 6.1. when several exception processing sources occur at once, they are processed according to the priority shown. table 6.1 types of exception processing and priority order exception source priority power-on reset reset manual reset cpu address error address error dmac address error instructionsfpu exception nmi user break h-udi irq interrupt on-chip peripheral modules: ? direct memory access controller (dmac) ? advanced timer unit-ii (atu-ii) ? compare match timer 0 (cmt0) ? multi trigger a/d0 (mtad0) ? a/d converter channel 0 (a/d0) ? compare match timer 1 (cmt1) ? multi trigger a/d1 (mtad1) ? a/d converter channel 1 (a/d1) ? a/d converter channel 2 (a/d2) ? serial communication interface (sci) ? controller area network 0 (hcan0) ? watchdog timer (wdt) ? controller area network 1 (hcan 1) high low
rev. 3.0, 09/04, page 86 of 1086 table 6.1 types of exception processing and priority order (cont) exception source priority trap instruction (trapa instruction) general illegal instructions (undefined code) instructions illegal slot instructions (undefined code placed directly after a delay branch instruction * 1 or instructions that rewrite the pc * 2 ) high low notes: 1. delayed branch instructions: jmp, jsr, bra, bsr, rts, rte, bf/s, bt/s, bsrf, braf. 2. instructions that rewrite the pc: jmp, jsr, bra, bsr, rts, rte, bt, bf, trapa, bf/s, bt/s, bsrf, braf. 6.1.2 exception processing operations the exception processing sources are detected and begin processing according to the timing shown in table 6.2. table 6.2 timing of exception source detection and start of exception processing exception source timing of source detection and start of processing power-on reset starts when the res pin changes from low to high or when the wdt overflows. reset manual reset starts when the wdt overflows. address error detected when instruction is decoded and starts when the previous executing instruction finishes executing. interrupts detected when instruction is decoded and starts when the previous executing instruction finishes executing. trap instruction starts from the execution of a trapa instruction. general illegal instructions starts from the decoding of undefined code anytime except after a delayed branch instruction (delay slot). illegal slot instructions starts from the decoding of undefined code placed in a delayed branch instruction (delay slot) or of instructions that rewrite the pc. instructions floating point instructions starts when a floating-point instruction causes an invalid operation exception (ieee754 specification) or division-by-zero exception.
rev. 3.0, 09/04, page 87 of 1086 when exception processing starts, the cpu operates as follows: 1. exception processing triggered by reset: the initial values of the program counter (pc) and stack pointer (sp) are fetched from the exception processing vector table (pc and sp are respectively the h'00000000 and h'00000004 addresses for power-on resets and the h'00000008 and h'0000000c addresses for manual resets). see section 6.1.3, exception processing vector table, for more information. h'00000000 is then written to the vector base register (vbr) and h'f (1111) is written to the interrupt mask bits (i3?i0) of the status register (sr). the program begins running from the pc address fetched from the exception processing vector table. 2. exception processing triggered by address errors, interrupts and instructions: sr and pc are saved to the stack indicated by r15. for interrupt exception processing, the interrupt priority level is written to the sr?s interrupt mask bits (i3?i0). for address error and instruction exception processing, the i3?i0 bits are not affected. the start address is then fetched from the exception processing vector table and the program begins running from that address. 6.1.3 exception processing vector table before exception processing begins running, the exception processing vector table must be set in memory. the exception processing vector table stores the start addresses of exception service routines. (the reset exception processing table holds the initial values of pc and sp.) all exception sources are given different vector numbers and vector table address offsets, from which the vector table addresses are calculated. during exception processing, the start addresses of the exception service routines are fetched from the exception processing vector table, which is indicated by this vector table address. table 6.3 shows the vector numbers and vector table address offsets. table 6.4 shows how vector table addresses are calculated. table 6.3 exception processing vector table exception sources vector numbers vector table address?offset pc 0 h'00000000?h'00000003 power-on reset sp 1 h'00000004?h'00000007 pc 2 h'00000008?h'0000000b manual reset sp 3 h'0000000c?h'0000000f general illegal instruction 4 h'00000010?h'00000013 (reserved by system) 5 h'00000014?h'00000017
rev. 3.0, 09/04, page 88 of 1086 table 6.3 exception processing vector table (cont) exception sources vector numbers vector table address?offset slot illegal instruction 6 h'00000018?h'0000001b 7 h'0000001c?h'0000001f (reserved by system) 8 h'00000020?h'00000023 cpu address error 9 h'00000024?h'00000027 dmac address error 10 h'00000028?h'0000002b nmi 11 h'0000002c?h'0000002f interrupts user break 12 h'00000030?h'00000033 fpu exception 13 h'00000034?h'00000037 h-udi 14 h'00000038?h'0000003b (reserved by system) 16 : 31 h'0000003c?h'00000043 : h'0000007c?h'0000007f trap instruction (user vector) 32 : 63 h'00000080?h'00000083 : h'000000fc?h'000000ff irq0 64 h'00000100?h'00000103 irq1 65 h'00000104?h'00000107 irq2 66 h'00000108?h'0000010b irq3 67 h'0000010c?h'0000010f irq4 68 h'00000110?h'00000113 irq5 69 h'00000114?h'00000117 irq6 70 h'00000118?h'0000011b interrupts irq7 71 h'0000011c?h'0000011f on-chip peripheral module * 72 : 255 h'00000120?h'00000124 : h'000003fc?h'000003ff note: * the vector numbers and vector table address offsets for each on-chip peripheral module interrupt are given in table 7.3, interrupt exception processing vectors and priorities, in section 7, interrupt controller (intc).
rev. 3.0, 09/04, page 89 of 1086 table 6.4 calculating exception processing vector table addresses exception source vector table address calculation resets vector table address = (vector table address offset) = (vector number) 4 address errors, interrupts, instructions vector table address = vbr + (vector table address offset) = vbr + (vector number) 4 notes: 1. vbr: vector base register 2. vector table address offset: see table 6.3. 3. vector number: see table 6.3.
rev. 3.0, 09/04, page 90 of 1086 6.2 resets 6.2.1 types of reset a reset is the highest-priority exception processing source. there are two kinds of reset, power-on and manual. as shown in table 6.5, the cpu state is initialized in both a power-on reset and a manual reset. on-chip peripheral module registers are also initialized by a power-on reset, but not by a manual reset. table 6.5 exception source detection and exception processing start timing conditions for transition to reset state internal states type res wdt overflow cpu/mult/ fpu/intc on-chip peripheral modules pfc, io port low ? initialized initialized initialized power-on reset high power-on reset initialized initialized not initialized manual reset high manual reset initialized not initialized not initialized 6.2.2 power-on reset power-on reset by means of res res res res pin: when the res pin is driven low, the chip enters the power-on reset state. to reliably reset the chip, the res pin should be kept at the low level for at least the duration of the oscillation settling time at power-on or when in standby mode (when the clock is halted), or at least 20 t cyc when the clock is running. in the power-on reset state, the cpu?s internal state and all the on-chip peripheral module registers are initialized. in the power-on reset state, power-on reset exception processing starts when the res pin is first driven low for a set period of time and then returned to high. the cpu operates as follows: 1. the initial value (execution start address) of the program counter (pc) is fetched from the exception processing vector table. 2. the initial value of the stack pointer (sp) is fetched from the exception processing vector table. 3. the vector base register (vbr) is cleared to h'00000000 and the interrupt mask bits (i3-i0) of the status register (sr) are set to h'f (1111). 4. the values fetched from the exception processing vector table are set in the pc and sp, and the program begins executing. be certain to always perform power-on reset processing when turning the system power on.
rev. 3.0, 09/04, page 91 of 1086 power-on reset initiated by wdt: when a setting is made for a power-on reset to be generated in the wdt?s watchdog timer mode, and the wdt?s tcnt overflows, the chip enters the power- on reset state. the pin function controller (pfc) registers and i/o port registers are not initialized by the reset signal generated by the wdt (these registers are only initialized by a power-on reset from off- chip). if reset caused by the input signal at the res pin and a reset caused by wdt overflow occur simultaneously, the res pin reset has priority, and the wovf bit in rstcsr is cleared to 0. when wdt-initiated power-on reset processing is started, the cpu operates as follows: 1. the initial value (execution start address) of the program counter (pc) is fetched from the exception processing vector table. 2. the initial value of the stack pointer (sp) is fetched from the exception processing vector table. 3. the vector base register (vbr) is cleared to h'00000000 and the interrupt mask bits (i3-i0) of the status register (sr) are set to h'f (1111). 4. the values fetched from the exception processing vector table are set in the pc and sp, and the program begins executing. 6.2.3 manual reset when a setting is made for a manual reset to be generated in the wdt?s watchdog timer mode, and the wdt?s tcnt overflows, the chip enters the power-on reset state. when wdt-initiated manual reset processing is started, the cpu operates as follows: 1. the initial value (execution start address) of the program counter (pc) is fetched from the exception processing vector table. 2. the initial value of the stack pointer (sp) is fetched from the exception processing vector table. 3. the vector base register (vbr) is cleared to h'00000000 and the interrupt mask bits (i3-i0) of the status register (sr) are set to h'f (1111). 4. the values fetched from the exception processing vector table are set in the pc and sp, and the program begins executing. when a manual reset is generated, the bus cycle is retained, but if a manual reset occurs while the bus is released or during dmac burst transfer, manual reset exception processing will be deferred until the cpu acquires the bus. however, if the interval from generation of the manual reset until the end of the bus cycle is equal to or longer than the internal manual reset interval of 512 cycles, the internal manual reset source is ignored instead of being deferred, and manual reset exception processing is not executed.
rev. 3.0, 09/04, page 92 of 1086 6.3 address errors 6.3.1 address error sources address errors occur when instructions are fetched or data read or written, as shown in table 6.6. table 6.6 bus cycles and address errors bus cycle type bus master bus cycle description address errors instruction fetched from even address none (normal) instruction fetched from odd address address error occurs instruction fetched from other than on-chip peripheral module space * none (normal) instruction fetched from on-chip peripheral module space * address error occurs instruction fetch cpu instruction fetched from external memory space when in single chip mode address error occurs word data accessed from even address none (normal) word data accessed from odd address address error occurs longword data accessed from a longword boundary none (normal) longword data accessed from other than a long-word boundary address error occurs byte or word data accessed in on-chip peripheral module space * none (normal) longword data accessed in 16-bit on-chip peripheral module space * none (normal) longword data accessed in 8-bit on-chip peripheral module space * address error occurs data read/write cpu or dmac external memory space accessed when in single chip mode address error occurs note: * see section 9, bus state controller (bsc), for details of the on-chip peripheral module space.
rev. 3.0, 09/04, page 93 of 1086 6.3.2 address error exception processing when an address error occurs, the bus cycle in which the address error occurred ends. when the executing instruction then finishes, address error exception processing starts up. the cpu operates as follows: 1. the status register (sr) is saved to the stack. 2. the program counter (pc) is saved to the stack. the pc value saved is the start address of the instruction to be executed after the last executed instruction. 3. the exception service routine start address is fetched from the exception processing vector table that corresponds to the address error that occurred and the program starts executing from that address. the jump that occurs is not a delayed branch. 6.4 interrupts 6.4.1 interrupt sources table 6.7 shows the sources that start up interrupt exception processing. these are divided into nmi, user breaks, h-udi, irq, and on-chip peripheral modules. table 6.7 interrupt sources type request source number of sources nmi nmi pin (external input) 1 user break user break controller 1 h-udi high-performance user debug interface 1 irq irq0 ? irq7 (external input) 8 direct memory access controller (dmac) 4 advanced timer unit (atu-ii) 75 compare match timer (cmt) 2 a/d converter 3 serial communication interface (sci) 20 watchdog timer (wdt) 1 on-chip peripheral module controller area network (hcan) 8 each interrupt source is allocated a different vector number and vector table offset. see table 7.3, interrupt exception processing vectors and priorities, in section 7, interrupt controller (intc), for more information on vector numbers and vector table address offsets.
rev. 3.0, 09/04, page 94 of 1086 6.4.2 interrupt priority level the interrupt priority order is predetermined. when multiple interrupts occur simultaneously (overlap), the interrupt controller (intc) determines their relative priorities and starts up processing according to the results. the priority order of interrupts is expressed as priority levels 0?16, with priority 0 the lowest and priority 16 the highest. the nmi interrupt has priority 16 and cannot be masked, so it is always accepted. the user break interrupt and h-udi interrupt priority level is 15. irq interrupts and on- chip peripheral module interrupt priority levels can be set freely using the intc?s interrupt priority registers a through l (ipra to iprl) as shown in table 6.8. the priority levels that can be set are 0?15. level 16 cannot be set. see section 7.3.1, interrupt priority registers a?l (ipra- iprl), for details of the interrupt priority registers. table 6.8 interrupt priority order type priority level comment nmi 16 fixed priority level. cannot be masked. user break 15 fixed priority level. h-udi 15 fixed priority level. irq 0?15 set with interrupt priority level setting registers a through l (ipra to iprl). on-chip peripheral module 0?15 set with interrupt priority level setting registers a through l (ipra to iprl). 6.4.3 interrupt exception processing when an interrupt occurs, its priority level is ascertained by the interrupt controller (intc). nmi is always accepted, but other interrupts are only accepted if they have a priority level higher than the priority level set in the interrupt mask bits (i3?i0) of the status register (sr). when an interrupt is accepted, exception processing begins. in interrupt exception processing, the cpu saves sr and the program counter (pc) to the stack. the priority level value of the accepted interrupt is written to sr bits i3?i0. for nmi, however, the priority level is 16, but the value set in i3?i0 is h'f (level 15). next, the start address of the exception service routine is fetched from the exception processing vector table for the accepted interrupt, that address is jumped to and execution begins. see section 7.4, interrupt operation, for further details.
rev. 3.0, 09/04, page 95 of 1086 6.5 exceptions triggered by instructions 6.5.1 types of exceptions triggered by instructions exception processing can be triggered by trap instructions, general illegal instructions, and illegal slot instructions, and floating-point instructions, as shown in table 6.9. table 6.9 types of exceptions triggered by instructions type source instruction comment trap instructions trapa illegal slot instructions undefined code placed immediately after a delayed branch instruction (delay slot) and instructions that rewrite the pc delayed branch instructions: jmp, jsr, bra, bsr, rts, rte, bf/s, bt/s, bsrf, braf instructions that rewrite the pc: jmp, jsr, bra, bsr, rts, rte, bt, bf, trapa, bf/s, bt/s, bsrf, braf general illegal instructions undefined code anywhere besides in a delay slot floating-point instructions instruction causing an invalid operation exception defined in the ieee754 standard or a division-by-zero exception fadd, fsub, fmul, fdiv, fmac, fcmp/eq, fcmp/gt, fneg, fabs, ftrc 6.5.2 trap instructions when a trapa instruction is executed, trap instruction exception processing starts up. the cpu operates as follows: 1. the status register (sr) is saved to the stack. 2. the program counter (pc) is saved to the stack. the pc value saved is the start address of the instruction to be executed after the trapa instruction. 3. the exception service routine start address is fetched from the exception processing vector table that corresponds to the vector number specified in the trapa instruction. that address is jumped to and the program starts executing. the jump that occurs is not a delayed branch.
rev. 3.0, 09/04, page 96 of 1086 6.5.3 illegal slot instructions an instruction placed immediately after a delayed branch instruction is said to be placed in a delay slot. when the instruction placed in the delay slot is undefined code, illegal slot exception processing starts up when that undefined code is decoded. illegal slot exception processing also starts up when an instruction that rewrites the program counter (pc) is placed in a delay slot. the processing starts when the instruction is decoded. the cpu handles an illegal slot instruction as follows: 1. the status register (sr) is saved to the stack. 2. the program counter (pc) is saved to the stack. the pc value saved is the jump address of the delayed branch instruction immediately before the undefined code or the instruction that rewrites the pc. 3. the exception service routine start address is fetched from the exception processing vector table that corresponds to the exception that occurred. that address is jumped to and the program starts executing. the jump that occurs is not a delayed branch. 6.5.4 general illegal instructions when undefined code placed anywhere other than immediately after a delayed branch instruction (i.e., in a delay slot) is decoded, general illegal instruction exception processing starts up. the cpu handles general illegal instructions in the same way as illegal slot instructions. unlike processing of illegal slot instructions, however, the program counter value stored is the start address of the undefined code. when the fpu has been stopped by means of the module stop bit, floating-point instructions and fpu-related cpu instructions are treated as illegal instructions. 6.5.5 floating-point instructions when the v or z bit is set in the enable field of the fpscr register, an fpu exception occurs. this indicates that a floating-point instruction has caused an invalid operation exception defined in the ieee754 standard or a division-by-zero exception. floating-point instructions which can cause an exception are as follows: fadd, fsub, fmul, fdiv, fmac, fcmp/eq, fcmp/gt, fneg, fabs, ftrc an fpu exception occurs only if the corresponding enable bit is set. when the fpu detects an exception source, fpu operation is suspended and the occurrence of the exception is reported to the cpu. when exception processing is started, the cpu saves the sr and pc contents to the stack (the pc value saved is the start address of the instruction following the last instruction executed), and branches to the address stored in vbr + h'00000034.
rev. 3.0, 09/04, page 97 of 1086 the exception flag bits in the fpscr are always updated, regardless of whether or not an fpu exception is accepted, and remain set until the user clears them explicitly with an instruction. fpscr cause bits change each time an fpu instruction is executed. exception events other than those defined in the ieee754 standard (i.e., underflow, overflow, and inexact exceptions) are detected by the fpu but do not result in the generation of any kind of exception. neither is an fpu exception generated by a floating-point instruction relating to data transfer, such as float. 6.6 when exception sources are not accepted when an address error or interrupt is generated after a delayed branch instruction or interrupt- disabled instruction, it is sometimes not accepted immediately but stored instead, as shown in table 6.10. when this happens, it will be accepted when an instruction that can accept the exception is decoded. table 6.10 generation of exception sources immediately after a delayed branch instruction or interrupt-disabled instruction exception source point of occurrence bus error interrupt fpu exception immediately after a delayed branch instruction * 1 not accepted not accepted not accepted immediately after an interrupt-disabled instruction * 2 not accepted * 4 not accepted accepted immediately after an fpu instruction * 3 not accepted not accepted accepted notes: 1. delayed branch instructions: jmp, jsr, bra, bsr, rts, rte, bf/s, bt/s, bsrf, braf 2. interrupt-disabled instructions: ldc, ldc.l, stc, stc.l, lds, lds.l, sts, sts.l 3. fpu instructions: table 2.18, floating-point instructions, and table 2.19, fpu-related cpu instructions, in section 2.4.1, instruction set by classification. 4. in the sh-2 a bus error is accepted.
rev. 3.0, 09/04, page 98 of 1086 6.7 stack status after exception processing ends the status of the stack after exception processing ends is as shown in table 6.11. table 6.11 stack status after exception processing ends exception type stack status address error 32 bits 32 bits sr address of instruction after executed instruction sp trap instruction 32 bits 32 bits sr address of instruction after trapa instruction sp general illegal instruction 32 bits 32 bits sr address of general illegal instruction sp interrupt 32 bits 32 bits sr address of instruction after executed instruction sp illegal slot instruction 32 bits 32 bits sr jump destination address of delay branch instruction sp fpu exception 32 bits 32 bits sr address of instruction after fpu exception instruction sp
rev. 3.0, 09/04, page 99 of 1086 6.8 usage notes 6.8.1 value of stack pointer (sp) the value of the stack pointer must always be a multiple of four. if it is not, an address error will occur when the stack is accessed during exception processing. 6.8.2 value of vector base register (vbr) the value of the vector base register must always be a multiple of four. if it is not, an address error will occur when the stack is accessed during exception processing. 6.8.3 address errors caused by stacking of address error exception processing when the stack pointer is not a multiple of four, an address error will occur during stacking of the exception processing (interrupts, etc.) and address error exception processing will start up as soon as the first exception processing is ended. address errors will then also occur in the stacking for this address error exception processing. to ensure that address error exception processing does not go into an endless loop, no address errors are accepted at that point. this allows program control to be shifted to the address error exception service routine and enables error processing. when an address error occurs during exception processing stacking, the stacking bus cycle (write) is executed. during stacking of the status register (sr) and program counter (pc), the sp is decremented by 4 for both, so the value of sp will not be a multiple of four after the stacking either. the address value output during stacking is the sp value, so the address where the error occurred is itself output. this means the write data stacked will be undefined.
rev. 3.0, 09/04, page 100 of 1086
rev. 3.0, 09/04, page 101 of 1086 section 7 interrupt controller (intc) 7.1 overview the interrupt controller (intc) ascertains the priority of interrupt sources and controls interrupt requests to the cpu. the intc has registers for setting the priority of each interrupt which can be used by the user to order the priorities in which the interrupt requests are processed. 7.1.1 features the intc has the following features: ? 16 levels of interrupt priority by setting the twelve interrupt-priority level registers, the priorities of irq interrupts and on- chip peripheral module interrupts can be set in 16 levels for different request sources. ? nmi noise canceler function nmi input level bits indicate the nmi pin status. by reading these bits with the interrupt exception service routine, the pin status can be confirmed, enabling it to be used as a noise canceler. ? notification of interrupt occurrence can be reported externally ( irqout pin) for example, it is possible to request the bus if an external bus master is informed that an on- chip peripheral module interrupt request has occurred when the chip has released the bus.
rev. 3.0, 09/04, page 102 of 1086 7.1.2 block diagram figure 7.1 is a block diagram of the intc. cpu sr interrupt request com- parator cpu/ dmac request judg- ment priority ranking judg- ment input control (interrupt request) (interrupt request) (interrupt request) (interrupt request) (interrupt request) (interrupt request) (interrupt request) (interrupt request) (interrupt request) (interrupt request) isr icr ipr ipra?iprl module bus bus interface internal bus i3 i2 i1 i0 intc nmi ubc h-udi dmac atu-ii cmt a/d mtad sci wdt hcan-ii ubc: h-udi: dmac: atu-ii: cmt: a/d: mtad: user break controller high-perfotmance user debug interface direct memory access controller advanced timer unit compare match timer a/d converter multi trigger a/d sci: wdt: hcan-ii: icr: isr: ipra?iprl: sr: serial communication interface watchdog timer controller area network ii interrupt control register irq status register interrupt priority level setting registers a to l status register figure 7.1 intc block diagram
rev. 3.0, 09/04, page 103 of 1086 7.1.3 pin configuration table 7.1 shows the intc pin configuration. table 7.1 pin configuration name abbreviation i/o function non-maskable interrupt input pin nmi i input of non-maskable interrupt request signal interrupt request input pins irq0 ? irq7 i input of maskable interrupt request signals interrupt request output pin irqout o output of notification signal when an interrupt has occurred 7.1.4 register configuration the intc has the 14 registers shown in table 7.2. these registers set the priority of the interrupts and control external interrupt input signal detection. table 7.2 register configuration name abbr. r/w initial value address access sizes interrupt priority register a ipra r/w h'0000 h'ffff ed00 8, 16, 32 interrupt priority register b iprb r/w h'0000 h'ffff ed02 8, 16, 32 interrupt priority register c iprc r/w h'0000 h'ffff ed04 8, 16, 32 interrupt priority register d iprd r/w h'0000 h'ffff ed06 8, 16, 32 interrupt priority register e ipre r/w h'0000 h'ffff ed08 8, 16, 32 interrupt priority register f iprf r/w h'0000 h'ffff ed0a 8, 16, 32 interrupt priority register g iprg r/w h'0000 h'ffff ed0c 8, 16, 32 interrupt priority register h iprh r/w h'0000 h'ffff ed0e 8, 16, 32 interrupt priority register i ipri r/w h'0000 h'ffff ed10 8, 16, 32 interrupt priority register j iprj r/w h'0000 h'ffff ed12 8, 16, 32 interrupt priority register k iprk r/w h'0000 h'ffff ed14 8, 16, 32 interrupt priority register l iprl r/w h'0000 h'ffff ed16 8, 16, 32 interrupt control register icr r/w * 1 h'ffff ed18 8, 16, 32 irq status register isr r/(w) * 2 h'0000 h'ffff ed1a 8, 16, 32 notes: in register access, four cycles are required for byte access and word access, and eight cycles for longword access. 1. the value when the nmi pin is high is h'8000; when the nmi pin is low, it is h'0000. 2. only 0 can be written, in order to clear flags.
rev. 3.0, 09/04, page 104 of 1086 7.2 interrupt sources there are five types of interrupt sources: nmi, user breaks, h-udi, irq, and on-chip peripheral modules. each interrupt has a priority expressed as a priority level (0 to 16, with 0 the lowest and 16 the highest). giving an interrupt a priority level of 0 masks it. 7.2.1 nmi interrupts the nmi interrupt has priority 16 and is always accepted. input at the nmi pin is detected by edge. use the nmi edge select bit (nmie) in the interrupt control register (icr) to select either the rising or falling edge. nmi interrupt exception processing sets the interrupt mask level bits (i3?i0) in the status register (sr) to level 15. 7.2.2 user break interrupt a user break interrupt has a priority of level 15, and occurs when the break condition set in the user break controller (ubc) is satisfied. user break interrupt requests are detected by edge and are held until accepted. user break interrupt exception processing sets the interrupt mask level bits (i3?i0) in the status register (sr) to level 15. for more information about the user break interrupt, see section 8, user break controller (ubc). 7.2.3 h-udi interrupt a serial debug interface (h-udi) interrupt has a priority level of 15, and occurs when an h-udi interrupt instruction is serially input. h-udi interrupt requests are detected by edge and are held until accepted. h-udi exception processing sets the interrupt mask level bits (i3-i0) in the status register (sr) to level 15. for more information about the h-udi interrupt, see section 19, high- performance user debug interface (h-udi). 7.2.4 irq interrupts irq interrupts are requested by input from pins irq0 ? irq7 . set the irq sense select bits (irq0s?irq7s) of the interrupt control register (icr) to select low level detection or falling edge detection for each pin. the priority level can be set from 0 to 15 for each pin using interrupt priority registers a and b (ipra?iprb). when irq interrupts are set to low level detection, an interrupt request signal is sent to the intc during the period the irq pin is low. interrupt request signals are not sent to the intc when the irq pin becomes high. interrupt request levels can be confirmed by reading the irq flags (irq0f?irq7f) of the irq status register (isr).
rev. 3.0, 09/04, page 105 of 1086 when irq interrupts are set to falling edge detection, interrupt request signals are sent to the intc upon detecting a change on the irq pin from high to low level. irq interrupt request detection results are maintained until the interrupt request is accepted. confirmation that irq interrupt requests have been detected is possible by reading the irq flags (irq0f?irq7f) of the irq status register (isr), and by writing a 0 after reading a 1, irq interrupt request detection results can be withdrawn. in irq interrupt exception processing, the interrupt mask bits (i3?i0) of the status register (sr) are set to the priority level value of the accepted irq interrupt. 7.2.5 on-chip peripheral module interrupts on-chip peripheral module interrupts are interrupts generated by the following on-chip peripheral modules: ? direct memory access controller (dmac) ? advanced timer unit (atu-ii) ? compare match timer (cmt) ? a/d converter (a/d) ? multi trigger a/d (mtad) ? serial communication interface (sci) ? watchdog timer (wdt) ? controller area network (hcan) a different interrupt vector is assigned to each interrupt source, so the exception service routine does not have to decide which interrupt has occurred. priority levels between 0 and 15 can be assigned to individual on-chip peripheral modules in interrupt priority registers c?l (iprc? iprl). on-chip peripheral module interrupt exception processing sets the interrupt mask level bits (i3?i0) in the status register (sr) to the priority level value of the on-chip peripheral module interrupt that was accepted.
rev. 3.0, 09/04, page 106 of 1086 7.2.6 interrupt exception vectors and priority rankings table 7.3 lists interrupt sources and their vector numbers, vector table address offsets and interrupt priorities. each interrupt source is allocated a different vector number and vector table address offset. vector table addresses are calculated from vector numbers and address offsets. in interrupt exception processing, the exception service routine start address is fetched from the vector table indicated by the vector table address. see table 6.4, calculating exception processing vector table addresses, in section 6, exception processing. irq interrupts and on-chip peripheral module interrupt priorities can be set freely between 0 and 15 for each pin or module by setting interrupt priority registers a?l (ipra?iprl). the ranking of interrupt sources for iprc?iprl, however, must be the order listed under priority within ipr setting range in table 7.3 and cannot be changed. a power-on reset assigns priority level 0 to irq interrupts and on-chip peripheral module interrupts. if the same priority level is assigned to two or more interrupt sources and interrupts from those sources occur simultaneously, their priority order is the default priority order indicated at the right in table 7.3.
rev. 3.0, 09/04, page 107 of 1086 table 7.3 interrupt exception processing vectors and priorities interrupt vector interrupt priority interrupt source vector no. vector table address offset priority (initial value) corre- sponding ipr (bits) within ipr setting range default priority nmi 11 h'0000002c to h'0000002f 16 ? ? ubc 12 h'00000030 to h'0000003b 15 ? ? h-udi 14 h'00000038 to h'0000003b 15 ? ? irq0 64 h'00000100 to h'0000013b 0 to 15 (0) ipra (15?12) ? irq1 65 h'00000104 to h'00000107 0 to 15 (0) ipra (11?8) ? irq2 66 h'00000108 to h'0000010b 0 to 15 (0) ipra (7?4) ? irq3 67 h'0000010c to h'0000010f 0 to 15 (0) ipra (3?0) ? irq4 68 h'00000110 to h'00000113 0 to 15 (0) iprb (15?12) ? irq5 69 h'00000114 to h'00000117 0 to 15 (0) iprb (11?8) ? irq6 70 h'00000118 to h'0000011b 0 to 15 (0) iprb (7?4) ? irq7 71 h'0000011c to h'0000011f 0 to 15 (0) iprb (3?0) ? dmac0 dei0 72 h'00000120 to h'00000123 0 to 15 (0) dmac1 dei1 74 h'00000128 to h'0000012b 0 to 15 (0) iprc (15?12) 1 2 dmac2 dei2 76 h'00000130 to h'00000133 0 to 15 (0) dmac3 dei3 78 h'00000138 to h'0000013b 0 to 15 (0) iprc (11?8) 1 2 high low
rev. 3.0, 09/04, page 108 of 1086 table 7.3 interrupt exception processing vectors and priorities (cont) interrupt vector interrupt priority interrupt source vector no. vector table address offset priority (initial value) corre- sponding ipr (bits) within ipr setting range default priority atu01 itv1/ itv2a/ itv2b 80 h'00000140 to h'00000143 0 to 15 (0) iprc (7?4) ici0a 84 h'00000150 to h'00000153 atu02 ici0b 86 h'00000158 to h'0000015b 0 to 15 (0) iprc (3?0) 1 2 ici0c 88 h'00000160 to h'00000163 atu03 ici0d 90 h'00000168 to h'0000016b 0 to 15 (0) iprd (15?12) 1 2 atu0 atu04 ovi0 92 h'00000170 to h'00000173 0 to 15 (0) iprd (11?8) imi1a/ cmi1 96 h'00000180 to h'00000183 imi1b 97 h'00000184 to h'00000187 imi1c 98 h'00000188 to h'0000018b atu11 imi1d 99 h'0000018c to h'0000018f 0 to 15 (0) iprd (7?4) 1 2 3 4 imi1e 100 h'00000190 to h'00000193 imi1f 101 h'00000194 to h'00000197 imi1g 102 h'00000198 to h'0000019b atu12 imi1h 103 h'0000019c to h'0000019f 0 to 15 (0) iprd (3?0) 1 2 3 4 atu1 atu13 ovi1a/ ovi1b 104 h'000001a0 to h'000001a3 0 to 15 (0) ipre (15?12) high low
rev. 3.0, 09/04, page 109 of 1086 table 7.3 interrupt exception processing vectors and priorities (cont) interrupt vector interrupt priority interrupt source vector no. vector table address offset priority (initial value) corre- sponding ipr (bits) within ipr setting range default priority imi2a/ cmi2a 108 h'000001b0 to h'000001b3 imi2b/ cmi2b 109 h'000001b4 to h'000001b7 imi2c/ cmi2c 110 h'000001b8 to h'000001bb atu21 imi2d/ cmi2d 111 h'000001bc to h'000001bf 0 to 15 (0) ipre (11?8) 1 2 3 4 imi2e/ cmi2e 112 h'000001c0 to h'000001c3 imi2f/ cmi2f 113 h'000001c4 to h'000001c7 imi2g/ cmi2g 114 h'000001c8 to h'000001cb atu22 imi2h/ cmi2h 115 h'000001cc to h'000001cf 0 to 15 (0) ipre (7?4) 1 2 3 4 atu2 atu23 ovi2a/ ovi2b 116 h'000001d0 to h'000001d3 0 to 15 (0) ipre (3?0) imi3a 120 h'000001e0 to h'000001e3 imi3b 121 h'000001e4 to h'000001e7 imi3c 122 h'000001e8 to h'000001eb atu31 imi3d 123 h'000001ec to h'000001ef 0 to 15 (0) iprf (15?12) 1 2 3 4 atu3 atu32 ovi3 124 h'000001f0 to h'000001f3 0 to 15 (0) iprf (11?8) high low
rev. 3.0, 09/04, page 110 of 1086 table 7.3 interrupt exception processing vectors and priorities (cont) interrupt vector interrupt priority interrupt source vector no. vector table address offset priority (initial value) corre- sponding ipr (bits) within ipr setting range default priority imi4a 128 h'00000200 to h'00000203 imi4b 129 h'00000204 to h'00000207 imi4c 130 h'00000208 to h'0000020b atu41 imi4d 131 h'0000020c to h'0000020f 0 to 15 (0) iprf (7?4) 1 2 3 4 atu4 atu42 ovi4 132 h'00000210 to h'00000213 0 to 15 (0) iprf (3?0) imi5a 136 h'00000220 to h'00000223 imi5b 137 h'00000224 to h'00000227 imi5c 138 h'00000228 to h'0000022b atu51 imi5d 139 h'0000022c to h'0000022f 0 to 15 (0) iprg (15?12) 1 2 3 4 atu5 atu52 ovi5 140 h'00000230 to h'00000233 0 to 15 (0) iprg (11?8) cmi6a 144 h'00000240 to h'00000243 cmi6b 145 h'00000244 to h'00000247 cmi6c 146 h'00000248 to h'0000024b atu6 cmi6d 147 h'0000024c to h'0000024f 0 to 15 (0) iprg (7?4) 1 2 3 4 high low
rev. 3.0, 09/04, page 111 of 1086 table 7.3 interrupt exception processing vectors and priorities (cont) interrupt vector interrupt priority interrupt source vector no. vector table address offset priority (initial value) corre- sponding ipr (bits) within ipr setting range default priority cmi7a 148 h'00000250 to h'00000253 cmi7b 149 h'00000254 to h'00000257 cmi7c 150 h'00000258 to h'0000025b atu7 cmi7d 151 h'0000025c to h'0000025f 0 to 15 (0) iprg (3?0) 1 2 3 4 osi8a 152 h'00000260 to h'00000263 osi8b 153 h'00000264 to h'00000267 osi8c 154 h'00000268 to h'0000026b atu81 osi8d 155 h'0000026c to h'0000026f 0 to 15 (0) iprh (15?12) 1 2 3 4 osi8e 156 h'00000270 to h'00000273 osi8f 157 h'00000274 to h'00000277 osi8g 158 h'00000278 to h'0000027b atu82 osi8h 159 h'0000027c to h'0000027f 0 to 15 (0) iprh (11?8) 1 2 3 4 osi8i 160 h'00000280 to h'00000283 osi8j 161 h'00000284 to h'00000287 osi8k 162 h'00000288 to h'0000028b atu8 atu83 osi8l 163 h'0000028c to h'0000028f 0 to 15 (0) iprh (7?4) 1 2 3 4 high low
rev. 3.0, 09/04, page 112 of 1086 table 7.3 interrupt exception processing vectors and priorities (cont) interrupt vector interrupt priority interrupt source vector no. vector table address offset priority (initial value) corre- sponding ipr (bits) within ipr setting range default priority osi8m 164 h'00000290 to h'00000293 osi8n 165 h'00000294 to h'00000297 osi8o 166 h'00000298 to h'0000029b atu8 atu84 osi8p 167 h'0000029c to h'0000029f 0 to 15 (0) iprh (3?0) 1 2 3 4 cmi9a 168 h'000002a0 to h'000002a3 cmi9b 169 h'000002a4 to h'000002a7 cmi9c 170 h'000002a8 to h'000002ab atu91 cmi9d 171 h'000002ac to h'000002af 0 to 15 (0) ipri (15?12) 1 2 3 4 cmi9e 172 h'000002b0 to h'000002b3 atu9 atu92 cmi9f 174 h'000002b8 to h'000002bb 0 to 15 (0) ipri (11?8) 1 2 cmi10a 176 h'000002c0 to h'000002c3 atu101 cmi10b 178 h'000002c8 to h'000002cb 0 to 15 (0) ipri (7?4) 1 2 atu10 atu102 ici10a/ cmi10g 180 h'000002d0 to h'000002d3 0 to 15(0) ipri (3?0) imi11a 184 h'000002e0 to h'000002e3 imi11b 186 h'000002e8 to h'000002eb atu11 ovi11 187 h'000002ec to h'000002ef 0 to 15 (0) iprj (15?12) 1 2 3 high low
rev. 3.0, 09/04, page 113 of 1086 table 7.3 interrupt exception processing vectors and priorities (cont) interrupt vector interrupt priority interrupt source vector no. vector table address offset priority (initial value) corre- sponding ipr (bits) within ipr setting range default priority cmt0 cmti0 188 h'000002f0 to h'000002f3 mtad0 adt0 189 h'000002f4 to h'000002f7 a/d0 adi0 190 h'000002f8 to h'000002fb 0 to 15 (0) i prj (11?8) 1 2 3 cmt1 cmti1 192 h'00000300 to h'00000303 mtad1 adt1 193 h'00000304 to h'00000307 a/d1 adi1 194 h'00000308 to h'0000030b 0 to 15 (0) iprj (7?4) 1 2 3 a/d2 adi2 196 h'00000310 to h'00000313 0 to 15 (0) iprj (3?0) eri0 200 h'00000320 to h'00000323 rxi0 201 h'00000324 to h'00000327 txi0 202 h'00000328 to h'0000032b sci0 tei0 203 h'0000032c to h'0000032f 0 to 15 (0) iprk (15?12) 1 2 3 4 eri1 204 h'00000330 to h'00000333 rxi1 205 h'00000334 to h'00000337 txi1 206 h'00000338 to h'0000033b sci1 tei1 207 h'0000033c to h'0000033f 0 to 15 (0) iprk (11?8) 1 2 3 4 high low
rev. 3.0, 09/04, page 114 of 1086 table 7.3 interrupt exception processing vectors and priorities (cont) interrupt vector interrupt priority interrupt source vector no. vector table address offset priority (initial value) corre- sponding ipr (bits) within ipr setting range default priority eri2 208 h'00000340 to h'00000343 rxi2 209 h'00000344 to h'00000347 txi2 210 h'00000348 to h'0000034b sci2 tei2 211 h'0000034c to h'0000034f 0 to 15 (0) iprk (7?4) 1 2 3 4 eri3 212 h'00000350 to h'00000353 rxi3 213 h'00000354 to h'00000357 txi3 214 h'00000358 to h'0000035b sci3 tei3 215 h'0000035c to h'0000035f 0 to 15 (0) iprk (3?0) 1 2 3 4 eri4 216 h'00000360 to h'00000363 rxi4 217 h'00000364 to h'00000367 txi4 218 h'00000368 to h'0000036b sci4 tei4 219 h'0000036c to h'0000036f 0 to 15 (0) iprl (15?12) 1 2 3 4 ers0 220 h'00000370 to h'00000373 ovr0 221 h'00000374 to h'00000377 rm0 222 h'00000378 to h'0000037b hcan0 sle0 223 h'0000037c to h'0000037f 0 to 15 (0) iprl (11?8) 1 2 3 4 high low
rev. 3.0, 09/04, page 115 of 1086 table 7.3 interrupt exception processing vectors and priorities (cont) interrupt vector interrupt priority interrupt source vector no. vector table address offset priority (initial value) corre- sponding ipr (bits) within ipr setting range default priority wdt iti 224 h'00000380 to h'00000383 0 to 15 (0) iprl (7?4) ers1 228 h'00000390 to h'00000393 ovr1 229 h'00000394 to h'00000397 rm1 230 h'00000398 to h'0000039b hcan1 sle1 231 h'0000039c to h'0000039f 0 to 15 (0) iprl (3?0) 1 2 3 4 high low 7.3 description of registers 7.3.1 interrupt priority registers a?l (ipra?iprl) bit: 15 14 13 12 11 10 9 8 initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit:76543210 initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w interrupt priority registers a?l (ipra?iprl) are 16-bit readable/writable registers that set priority levels from 0 to 15 for irq interrupts and on-chip peripheral module interrupts. correspondence between interrupt request sources and each of the ipra?iprl bits is shown in table 7.4.
rev. 3.0, 09/04, page 116 of 1086 table 7.4 interrupt request sources and ipra?iprl bits register 15?12 11?8 7?4 3?0 interrupt priority register a irq0 irq1 irq2 irq3 interrupt priority register b irq4 irq5 irq6 irq7 interrupt priority register c dmac0, 1 dmac2, 3 atu01 atu02 interrupt priority register d atu03 atu04 atu11 atu12 interrupt priority register e atu13 atu21 atu22 atu23 interrupt priority register f atu31 atu32 atu41 atu42 interrupt priority register g atu51 atu52 atu6 atu7 interrupt priority register h atu81 atu82 atu83 atu84 interrupt priority register i atu91 atu92 atu101 atu102 interrupt priority register j atu11 cmt0, a/d0, mtad0 cmt1, a/d1, mtad1 a/d2 interrupt priority register k sci0 sci1 sci2 sci3 interrupt priority register l sci4 hcan0 wdt hcan1 as indicated in table 7.4, four irq pins or groups of 4 on-chip peripheral modules are allocated to each register. each of the corresponding interrupt priority ranks are established by setting a value from h'0 (0000) to h'f (1111) in each of the four-bit groups 15?12, 11?8, 7?4 and 3?0. interrupt priority rank becomes level 0 (lowest) by setting h'0, and level 15 (highest) by setting h'f. if multiple on-chip peripheral modules are assigned to the same bit (dmac0 and dmac1, dmac2 and dmac3, cmt0, a/d0, and mtad0, and cmt1, a/d1, and mtad1), those multiple modules are set to the same priority rank. ipra?iprl are initialized to h'0000 by a reset and in hardware standby mode. they are not initialized in software standby mode.
rev. 3.0, 09/04, page 117 of 1086 7.3.2 interrupt control register (icr) bit: 15 14 13 12 11 10 9 8 nmil??????nmie initial value: * 0000000 r/w:rrrrrrrr/w bit:76543210 irq0s irq1s irq2s irq3s irq4s irq5s irq6s irq7s initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w note: * when nmi input is high: 1; when nmi input is low: 0 icr is a 16-bit register that sets the input signal detection mode of the external interrupt input pin nmi and irq0 ? irq7 and indicates the input signal level at the nmi pin. a reset and hardware standby mode initialize icr but the software standby mode does not. ? bit 15?nmi input level (nmil): sets the level of the signal input at the nmi pin. this bit can be read to determine the nmi pin level. this bit cannot be modified. bit 15: nmil description 0 nmi input level is low 1 nmi input level is high ? bits 14 to 9?reser]ved: these bits are always read as 0. the write value should always be 0. ? bit 8?nmi edge select (nmie) bit 8: nmie description 0 interrupt request is detected on falling edge of nmi input (initial value) 1 interrupt request is detected on rising edge of nmi input ? bits 7 to 0?irq0?irq7 sense select (irq0s?irq7s): these bits set the irq0?irq7 interrupt request detection mode. bits 7-0: irq0s?irq7s description 0 interrupt request is detected on low level of irq input (initial value) 1 interrupt request is detected on falling edge of irq input
rev. 3.0, 09/04, page 118 of 1086 7.3.3 irq status register (isr) bit: 15 14 13 12 11 10 9 8 ???????? initial value:00000000 r/w:rrrrrrrr bit:76543210 irq0f irq1f irq2f irq3f irq4f irq5f irq6f irq7f initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w isr is a 16-bit register that indicates the interrupt request status of the external interrupt input pins irq0 ? irq7 . when irq interrupts are set to edge detection, held interrupt requests can be withdrawn by writing 0 to irqnf after reading irqnf = 1. a reset and hardware standby mode initialize isr but software standby mode does not. ? bits 15 to 8?reserved: these bits are always read as 0. the write value should always be 0. ? bits 7 to 0?irq0?irq7 flags (irq0f?irq7f): these bits display the irq0?irq7 interrupt request status. bits 7-0: irq0f?irq7f detection setting description level detection no irqn interrupt request exists [clearing condition] when irqn input is high 0 edge detection no irqn interrupt request was detected (initial value) [clearing conditions] ? when 0 is written after reading irqnf = 1 ? when irqn interrupt exception processing has been executed level detection an irqn interrupt request exists setting condition: when irqn input is low 1 edge detection an irqn interrupt request was detected setting condition: when a falling edge occurs at an irqn input n = 7 to 0
rev. 3.0, 09/04, page 119 of 1086 7.4 interrupt operation 7.4.1 interrupt sequence the sequence of interrupt operations is explained below. figure 7.2 is a flowchart of the operations. 1. the interrupt request sources send interrupt request signals to the interrupt controller. 2. the interrupt controller selects the highest priority interrupt in the interrupt requests sent, following the priority levels set in interrupt priority registers a?l (ipra?iprl). lower- priority interrupts are ignored. they are held pending until interrupt requests designated as edge-detect type are accepted. for irq interrupts, however, withdrawal is possible by accessing the irq status register (isr). see section 7.2.4, irq interrupts, for details. interrupts held pending due to edge detection are cleared by a power-on reset or a manual reset. if two of these interrupts have the same priority level or if multiple interrupts occur within a single module, the interrupt with the highest default priority or the highest priority within its ipr setting range (as indicated in table 7.3) is selected. 3. the interrupt controller compares the priority level of the selected interrupt request with the interrupt mask bits (i3?i0) in the cpu?s status register (sr). if the request priority level is equal to or less than the level set in i3?i0, the request is ignored. if the request priority level is higher than the level in bits i3?i0, the interrupt controller accepts the interrupt and sends an interrupt request signal to the cpu. 4. when the interrupt controller accepts an interrupt, a low level is output from the irqout pin. 5. the cpu detects the interrupt request sent from the interrupt controller when it decodes the next instruction to be executed. instead of executing the decoded instruction, the cpu starts interrupt exception processing (figure 7.4). 6. sr and pc are saved onto the stack. 7. the priority level of the accepted interrupt is copied to the interrupt mask level bits (i3 to i0) in the status register (sr). 8. when the accepted interrupt is sensed by level or is from an on-chip peripheral module, a high level is output from the irqout pin. when the accepted interrupt is sensed by edge, a high level is output from the irqout pin at the point when the cpu starts interrupt exception processing instead of instruction execution as noted in 5 above. however, if the interrupt controller accepts an interrupt with a higher priority than one it is in the process of accepting, the irqout pin will remain low. 9. the cpu reads the start address of the exception service routine from the exception vector table for the accepted interrupt, jumps to that address, and starts executing the program there. this jump is not a delay branch.
rev. 3.0, 09/04, page 120 of 1086 no yes nmi? no yes user break? no yes no h-udi interrupt? yes level 15 interrupt? no yes i3 to i0 level 14? no yes level 14 interrupt? no yes yes i3 to i0 level 13? no yes level 1 interrupt? no yes i3 to i0 = level 0? no program execution state irqout = low level * 1 save sr to stack save pc to stack irqout = high level * 2 branch to exception service routine i3 to i0: interrupt mask bits of status register interrupt? copy accept-interrupt level to i3 to i0 read exception vector table notes: 1. 2. as irqout is synchronized with a peripheral clock p , it may be output later than a cpu interrupt request. when the accepted interrupt is sensed by edge, the irqout pin becomes high level at the point when the cpu starts interrupt exception processing instead of instruction execution (before sr is saved to the stack). if the interrupt controller has accepted another interrupt with a higher priority and has output an interrupt request to the cpu, the irqout pin will remain low. figure 7.2 interrupt sequence flowchart
rev. 3.0, 09/04, page 121 of 1086 7.4.2 stack after interrupt exception processing figure 7.3 shows the stack after interrupt exception processing. 32 bits 32 bits pc * 1 sr address 4n ? 8 4n ? 4 4n sp * 2 notes: 1. 2. pc: start address of the next instruction (return destination instruction) after the executing instruction always be certain that sp is a multiple of 4 figure 7.3 stack after interrupt exception processing
rev. 3.0, 09/04, page 122 of 1086 7.5 interrupt response time table 7.5 indicates the interrupt response time, which is the time from the occurrence of an interrupt request until the interrupt exception processing starts and fetching of the first instruction of the interrupt service routine begins. figure 7.4 shows an example of pipeline operation when an irq interrupt is accepted. table 7.5 interrupt response time (multiplication ratio of 8) number of states item peripheral module nmi irq notes synchronizing input signal (synchronized with peripheral clock p ) with internal clock and dmac activation judgment 0 or 6 [0 or 3] 1 to 4 [1 or 2] 6 to 9 [3 to 5] for the number of states required for each interrupt, see the note ( * ) below. the values enclosed in [ ] are values for when the multiplication ratio is 4. compare identified interrupt priority with sr mask level 222 wait for completion of sequence currently being executed by cpu x ( 0) the longest sequence is for interrupt or address-error exception processing (x = 4 + m1 + m2 + m3 + m4). if an interrupt-masking instruction follows, however, the time may be even longer. time from start of interrupt exception processing until fetch of first instruction of exception service routine starts 5 + m1 + m2 + m3 performs the pc and sr saves and vector address fetch. total: (7 or 13) + m1 + m2 + m3 + x (8 to 11) + m1 + m2 + m3 + x (13 to 16) + m1 + m2 + m3 + x minimum: 10 11 16 interrupt response time maximum: 17 + 2 (m1 + m2 + m3) + m4 15 + 2 (m1 + m2 + m3) + m4 20 + 2 (m1 + m2 + m3) + m4 note: * number of states needed for synchronization and dmac activation judgment the relations between numbers of states needed for synchronizing an input signal (synchronized with the peripheral clock p ) with the internal clock and dmac activation judgment and vector numbers are shown below. 0 state: 9, 10, 12, 13, 14, 72, 74, 76, 78, 189, 193, and 224 6 states: peripheral module interrupts other than the above. however, vector number 222 (hcan0/rm0) is different from the others.
rev. 3.0, 09/04, page 123 of 1086 for an interrupt with vector number 222 (hcan0/rm0), the needed states differ from other interrupts since the interrupt by hcan0 mailbox 0 can activate the dmac. hcan0 mailbox 0: 7 states other than above: 6 states the same number of states is needed to cancel interrupt sources. if the necessary number of states is not secured after flag clear of the interrupt source, the interrupt may occur again. interrupt acceptance instruction interrupt controller processing synchronization of irq irq 2 6 to 9 3 m1 m2 1 m3 1 fdeemmemee f fd e 5 + m1 + m2 + m3 overrun fetch interrupt service routine start instruction f: d: e: m: instruction fetch (instruction fetched from memory where program is stored). instruction decoding (fetched instruction is decoded). instruction execution (data operation and address calculation is performed according to the results of decoding). memory access (data in memory is accessed). figure 7.4 example of pipeline operation when an irq interrupt is accepted
rev. 3.0, 09/04, page 124 of 1086 7.6 data transfer with interrupt request signals the following data transfer can be carried out using interrupt request signals: ? activate dmac only, without generating cpu interrupt among interrupt sources, those designated as dmac activating sources are masked and not input to the intc. the masking condition is as follows: mask condition = dme  (de0  source selection 0 + de1  source selection 1 + de2  source selection 2 + de3  source selection 3) 7.6.1 handling cpu interrupt sources, but not dmac activating sources 1. either do not select the dmac as a source, or clear the dme bit to 0. 2. activating sources are applied to the cpu when interrupts occur. 3. the cpu clears interrupt sources with its interrupt processing routine and performs the necessary processing. 7.6.2 handling dmac activating sources but not cpu interrupt sources 1. select the dmac as a source and set the dme bit to 1. cpu interrupt sources are masked regardless of the interrupt priority level register settings. 2. activating sources are applied to the dmac when interrupts occur. 3. the dmac clears activating sources at the time of data transfer.
rev. 3.0, 09/04, page 125 of 1086 section 8 user break controller (ubc) 8.1 overview the user break controller (ubc) provides functions that simplify program debugging. break conditions are set in the ubc and a user break interrupt is generated according to the conditions of the bus cycle generated by the cpu or dmac. this function makes it easy to design an effective self-monitoring debugger, enabling the chip to easily debug programs without using a large in- circuit emulator. 8.1.1 features the features of the user break controller are: ? the following break compare conditions can be set: ? address ? cpu cycle/dma cycle ? instruction fetch or data access ? read or write ? operand size: byte/word/longword ? user break interrupt generated upon satisfying break conditions a user-designed user break interrupt exception processing routine can be run. ? select either to break in the cpu instruction fetch cycle before the instruction is executed or after. ? satisfaction of a break condition can be output to the ubctrg pin.
rev. 3.0, 09/04, page 126 of 1086 8.1.2 block diagram figure 8.1 shows a block diagram of the ubc. module bus ubbr ubamrh ubamrl ubarh ubarl break condition comparator user break interrupt generating circuit bus interface internal bus interrupt request interrupt controller trigger output generating circuit ubcr pin output ubarh, ubarl: ubamrh, ubamrl: ubbr: ubcr: user break address registers h, l user break address mask registers h, l user break bus cycle register user break control register figure 8.1 user break controller block diagram
rev. 3.0, 09/04, page 127 of 1086 8.1.3 register configuration the ubc has the six registers shown in table 8.1. break conditions are established using these registers. table 8.1 register configuration name abbr. r/w initial value address * access size user break address register h ubarh r/w h'0000 h'ffffec00 8, 16, 32 user break address register l ubarl r/w h'0000 h'ffffec02 8, 16, 32 user break address mask register h ubamrh r/w h'0000 h'ffffec04 8, 16, 32 user break address mask register l ubamrl r/w h'0000 h'ffffec06 8, 16, 32 user break bus cycle register ubbr r/w h'0000 h'ffffec08 8, 16, 32 user break control register ubcr r/w h'0000 h'ffffec0a 8, 16, 32 note: * in register access, four cycles are required for byte access and word access, and eight cycles for longword access. 8.2 register descriptions 8.2.1 user break address register (ubar) ubarh: bit: 15 14 13 12 11 10 9 8 uba31 uba30 uba29 uba28 uba27 uba26 uba25 uba24 initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit:76543210 uba23 uba22 uba21 uba20 uba19 uba18 uba17 uba16 initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w
rev. 3.0, 09/04, page 128 of 1086 ubarl: bit: 15 14 13 12 11 10 9 8 uba15 uba14 uba13 uba12 uba11 uba10 uba9 uba8 initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit:76543210 uba7 uba6 uba5 uba4 uba3 uba2 uba1 uba0 initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the user break address register (ubar) consists of user break address register h (ubarh) and user break address register l (ubarl). both are 16-bit readable/writable registers. ubarh stores the upper bits (bits 31 to 16) of the address of the break condition, while ubarl stores the lower bits (bits 15 to 0). ubarh and ubarl are initialized to h'0000 by a power-on reset and in module standby mode. they are not initialized in software standby mode. ? ubarh bits 15 to 0?user break address 31 to 16 (uba31 to uba16): these bits store the upper bit values (bits 31 to 16) of the address of the break condition. ? ubarl bits 15 to 0?user break address 15 to 0 (uba15 to uba0): these bits store the lower bit values (bits 15 to 0) of the address of the break condition. 8.2.2 user break address mask register (ubamr) ubamrh: bit: 15 14 13 12 11 10 9 8 ubm31 ubm30 ubm29 ubm28 ubm27 ubm26 ubm25 ubm24 initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit:76543210 ubm23 ubm22 ubm21 ubm20 ubm19 ubm18 ubm17 ubm16 initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w
rev. 3.0, 09/04, page 129 of 1086 ubamrl: bit: 15 14 13 12 11 10 9 8 ubm15 ubm14 ubm13 ubm12 ubm11 ubm10 ubm9 ubm8 initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit:76543210 ubm7 ubm6 ubm5 ubm4 ubm3 ubm2 ubm1 ubm0 initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the user break address mask register (ubamr) consists of user break address mask register h (ubamrh) and user break address mask register l (ubamrl). both are 16-bit readable/writable registers. ubamrh designates whether to mask any of the break address bits established in ubarh, and ubamrl designates whether to mask any of the break address bits established in ubarl. ubamrh and ubamrl are initialized to h'0000 by a power-on reset and in module standby mode. they are not initialized in software standby mode. ? ubamrh bits 15 to 0?user break address mask 31 to 16 (ubm31 to ubm16): these bits designate whether to mask the corresponding break address 31 to 16 bits (uba31 to uba16) established in ubarh. ? ubamrl bits 15 to 0?user break address mask 15 to 0 (ubm15 to ubm0): these bits designate whether to mask the corresponding break address 15 to 0 bits (uba15 to uba0) established in ubarl. bits 15 ? 0: ubmn description 0 break address uban is included in the break conditions (initial value) 1 break address uban is not included in the break conditions note: n = 31 to 0
rev. 3.0, 09/04, page 130 of 1086 8.2.3 user break bus cycle register (ubbr) bit: 15 14 13 12 11 10 9 8 ???????? initial value:00000000 r/w:rrrrrrrr bit:76543210 cp1 cp0 id1 id0 rw1 rw0 sz1 sz0 initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the user break bus cycle register (ubbr) is a 16-bit readable/writable register that selects from among the following four break conditions: 1. cpu cycle/dma cycle 2. instruction fetch/data access 3. read/write 4. operand size (byte, word, longword) ubbr is initialized to h'0000 by a power on reset and in module standby mode. it is not initialized in software standby mode. ? bits 15 to 8?reserved: these bits are always read as 0. the write value should always be 0. ? bits 7 and 6?cpu cycle/dma cycle select (cp1, cp0): these bits designate break conditions for cpu cycles or dma cycles. bit 7: cp1 bit 6: cp0 description 0 no user break interrupt occurs (initial value) 0 1 break on cpu cycles 0 break on dma cycles 1 1 break on both cpu and dma cycles
rev. 3.0, 09/04, page 131 of 1086 ? bits 5 and 4?instruction fetch/data access select (id1, id0): these bits select whether to break on instruction fetch and/or data access cycles. bit 5: id1 bit 4: id0 description 0 no user break interrupt occurs (initial value) 0 1 break on instruction fetch cycles 0 break on data access cycles 1 1 break on both instruction fetch and data access cycles ? bits 3 and 2?read/write select (rw1, rw0): these bits select whether to break on read and/or write cycles. bit 3: rw1 bit 2: rw0 description 0 no user break interrupt occurs (initial value) 0 1 break on read cycles 0 break on write cycles 1 1 break on both read and write cycles ? bits 1 and 0?operand size select (sz1, sz0): these bits select operand size as a break condition. bit 1: sz1 bit 0: sz0 description 0 operand size is not a break condition (initial value) 0 1 break on byte access 0 break on word access 1 1 break on longword access note: when breaking on an instruction fetch, clear the sz0 bit to 0. all instructions are considered to be word-size accesses (even when there are instructions in on-chip memory and two instruction fetches are performed simultaneously in one bus cycle). operand size is word for instructions or determined by the operand size specified for the cpu/dmac data access. it is not determined by the bus width of the space being accessed.
rev. 3.0, 09/04, page 132 of 1086 8.2.4 user break control register (ubcr) bit: 15 14 13 12 11 10 9 8 ???????? initial value:00000000 r/w:rrrrrrrr bit:76543210 ?????cks1cks0ubid initial value:00000000 r/w:rrrrrr/wr/wr/w the user break control register (ubcr) is a 16-bit readable/writable register that (1) enables or disables user break interrupts and (2) sets the pulse width of the ubctrg signal output in the event of a break condition match. ubcr is initialized to h'0000 by a power-on reset and in module standby mode. it is not initialized in software standby mode. ? bits 15 to 3?reserved: these bits are always read as 0. the write value should always be 0. ? bits 2 and 1?clock select 1 and 0 (cks1, cks0): these bits specify the pulse width of the ubctrg signal output in the event of a condition match. bit 2: cks1 bit 1: cks0 description 0 when the internal clock is four times an input clock, ubctrg pulse width is /2 when the internal clock is eight times an input clock, ubctrg pulse width is /4 (initial value) 0 1 ubctrg pulse width is /4 0 ubctrg pulse width is /8 1 1 ubctrg pulse width is /16 notes: : internal clock see section 8.5.7, internal clock ( ) multiplication ratio and ubctrg pulse width. ? bit 0?user break disable (ubid): enables or disables user break interrupt request generation in the event of a user break condition match. bit 0: ubid description 0 user break interrupt request is enabled (initial value) 1 user break interrupt request is disabled
rev. 3.0, 09/04, page 133 of 1086 8.3 operation 8.3.1 flow of the u s er b reak operation the flow from setting of break conditions to user break interrupt exception processing is described below: 1. the user break addresses are set in the user break address register (ubar), the desired masked bits in the addresses are set in the user break address mask register (ubamr) and the breaking bus cycle type is set in the user break bus cycle register (ubbr). if even one of the three groups of the ubbr?s cpu cycle/dma cycle select bits (cp1, cp0), instruction fetch/data access select bits (id1, id0), and read/write select bits (rw1, rw0) is set to 00 (no user break generated), no user break interrupt will be generated even if all other conditions are in agreement. when using user break interrupts, always be certain to establish bit conditions for all of these three groups. 2. the ubc uses the method shown in figure 8.2 to judge whether set conditions have been fulfilled. when the set conditions are satisfied, the ubc sends a user break interrupt request signal to the interrupt controller (intc). at the same time, a condition match signal is output at the ubctrg pin with the pulse width set in bits cks1 and cks0. 3. the interrupt controller checks the accepted user break interrupt request signal?s priority level. the user break interrupt has priority level 15, so it is accepted only if the interrupt mask level in bits i3?i0 in the status register (sr) is 14 or lower. when the i3?i0 bit level is 15, the user break interrupt cannot be accepted but it is held pending until user break interrupt exception processing can be carried out. consequently, user break interrupts within nmi exception service routines cannot be accepted, since the i3?i0 bit level is 15. however, if the i3?i0 bit level is changed to 14 or lower at the start of the nmi exception service routine, user break interrupts become acceptable thereafter. section 7, interrupt controller (intc), describes the handling of priority levels in greater detail. 4. the intc sends the user break interrupt request signal to the cpu, which begins user break interrupt exception processing upon receipt. see section 7.4, interrupt operation, for details on interrupt exception processing.
rev. 3.0, 09/04, page 134 of 1086 sz1 sz0 user break interrupt rw1 rw0 id1 id0 cp1 cp0 ubarh/ubarl ubamrh/ubamrl ubid 32 32 32 32 32 internal address bits 31?0 cpu cycle dma cycle instruction fetch data access read cycle write cycle byte size word size longword size figure 8.2 break condition judgment method
rev. 3.0, 09/04, page 135 of 1086 8.3.2 break on on-chip memory instruction fetch cycle on-chip memory (on-chip rom and/or ram) is always accessed as 32 bits in one bus cycle. therefore, two instructions can be retrieved in one bus cycle when fetching instructions from on- chip memory. at such times, only one bus cycle is generated, but by setting the start addresses of both instructions in the user break address register (ubar) it is possible to cause independent breaks. in other words, when wanting to effect a break using the latter of two addresses retrieved in one bus cycle, set the start address of that instruction in ubar. the break will occur after execution of the former instruction. 8.3.3 program counter (pc) values saved break on instruction fetch: the program counter (pc) value saved to the stack in user break interrupt exception processing is the address that matches the break condition. the user break interrupt is generated before the fetched instruction is executed. if a break condition is set in an instruction fetch cycle placed immediately after a delayed branch instruction (delay slot), or on an instruction that follows an interrupt-disabled instruction, however, the user break interrupt is not accepted immediately, but the break condition establishing instruction is executed. the user break interrupt is accepted after execution of the instruction that has accepted the interrupt. in this case, the pc value saved is the start address of the instruction that will be executed after the instruction that has accepted the interrupt. break on data access (cpu/dma): the program counter (pc) value is the top address of the next instruction after the last instruction executed before the user break exception processing started. when data access (cpu/dma) is set as a break condition, the place where the break will occur cannot be specified exactly. the break will occur at the instruction fetched close to where the data access that is to receive the break occurs. 8.4 examples of use 8.4.1 break on cpu instruction fetch cycle 1. register settings: ubarh = h'0000 ubarl = h'0404 ubbr = h'0054 ubcr = h'0000 conditions set: address: h'00000404 bus cycle: cpu, instruction fetch, read (operand size not included in conditions) interrupt requests enabled
rev. 3.0, 09/04, page 136 of 1086 a user break interrupt will occur before the instruction at address h'00000404. if it is possible for the instruction at h'00000402 to accept an interrupt, the user break exception processing will be executed after execution of that instruction. the instruction at h'00000404 is not executed. the pc value saved is h'00000404. 2. register settings: ubarh = h'0015 ubarl = h'389c ubbr = h'0058 ubcr = h'0000 conditions set: address: h'0015389c bus cycle: cpu, instruction fetch, write (operand size not included in conditions) interrupt requests enabled a user break interrupt does not occur because the instruction fetch cycle is not a write cycle. 3. register settings: ubarh = h'0003 ubarl = h'0147 ubbr = h'0054 ubcr = h'0000 conditions set: address: h'00030147 bus cycle: cpu, instruction fetch, read (operand size not included in conditions) interrupt requests enabled a user break interrupt does not occur because the instruction fetch was performed for an even address. however, if the first instruction fetch address after the branch is an odd address set by these conditions, user break interrupt exception processing will be carried out after address error exception processing. 8.4.2 break on cpu data access cycle 1. register settings: ubarh = h'0012 ubarl = h'3456 ubbr = h'006a ubcr = h'0000 conditions set: address: h'00123456 bus cycle: cpu, data access, write, word interrupt requests enabled a user break interrupt occurs when word data is written into address h'00123456. 2. register settings: ubarh = h'00a8 ubarl = h'0391 ubbr = h'0066 ubcr = h'0000
rev. 3.0, 09/04, page 137 of 1086 conditions set: address: h'00a80391 bus cycle: cpu, data access, read, word interrupt requests enabled a user break interrupt does not occur because the word access was performed on an even address. 8.4.3 break on dma cycle 1. register settings: ubarh = h'0076 ubarl = h'bcdc ubbr = h'00a7 ubcr = h'0000 conditions set: address: h'0076bcdc bus cycle: dma, data access, read, longword interrupt requests enabled a user break interrupt occurs when longword data is read from address h'0076bcdc. 2. register settings: ubarh = h'0023 ubarl = h'45c8 ubbr = h'0094 ubcr = h'0000 conditions set: address: h'002345c8 bus cycle: dma, instruction fetch, read (operand size not included in conditions) interrupt requests enabled a user break interrupt does not occur because no instruction fetch is performed in the dma cycle.
rev. 3.0, 09/04, page 138 of 1086 8.5 usage notes 8.5.1 simultaneous fetching of two instructions two instructions may be simultaneously fetched from on-chip memory. if a break condition is set on the second of these two instructions but the contents of the ubc break condition registers are changed so as to alter the break condition immediately after the first of the two instructions is fetched, a user break interrupt will still occur when the second instruction is fetched. 8.5.2 instruction fetches at branches when a conditional branch instruction or trapa instruction causes a branch, the order of instruction fetching and execution is as follows: 1. when branching with a conditional branch instruction: bt and bf instructions when branching with a trapa instruction: trapa instruction instruction fetch order: branch instruction fetch next instruction overrun fetch overrun fetch of instruction after next branch destination instruction fetch instruction execution order: branch instruction execution branch destination instruction execution 2. when branching with a delayed conditional branch instruction: bt/s and bf/s instructions instruction fetch order: branch instruction fetch next instruction fetch (delay slot) overrun fetch of instruction after next branch destination instruction fetch instruction execution order: branch instruction execution delay slot instruction execution branch destination instruction execution thus, when a conditional branch instruction or trapa instruction causes a branch, the branch destination instruction will be fetched after an overrun fetch of the next instruction or the instruction after next. however, as the instruction that is the object of the break does not break until fetching and execution of the instruction have been confirmed, the overrun fetches described above do not become objects of a break. if data accesses are also included as break conditions in addition to instruction fetch breaks, a break will occur because the instruction overrun fetch is also regarded as satisfying the data break condition.
rev. 3.0, 09/04, page 139 of 1086 8.5.3 contention between user break and exception processing if a user break is set for the fetch of a particular instruction, and exception processing with higher priority than a user break is in contention and is accepted in the decode stage for that instruction (or the next instruction), user break exception processing may not be performed after completion of the higher-priority exception service routine (on return by rte). thus, if a user break condition is applied to the branch destination instruction fetch after a branch (bra, braf, bt, bf, bt/s, bf/s, bsr, bsrf, jmp, jsr, rts, rte, exception processing), and that branch instruction accepts exception processing with higher priority than a user break interrupt, user break exception processing is not performed after completion of the higher-priority exception service routine. therefore, a user break condition should not be set for the fetch of the branch destination instruction after a branch. 8.5.4 break at non-delay branch instruction jump destination when a branch instruction with no delay slot (including exception processing) jumps to the jump destination instruction on execution of the branch, a user break will not be generated even if a user break condition has been set for the first jump destination instruction fetch. 8.5.5 user break trigger output information on internal bus condition matches monitored by the ubc is output as ubctrg . the trigger width can be set with clock select bits 1 and 0 (cks1, cks0) in the user break control register (ubcr). if a condition matches occurs again during trigger output, the ubctrg pin continues to output a low level, and outputs a pulse of the length set in bits cks1 and cks0 from the cycle in which the last condition match occurs. the trigger output conditions differ from those in the case of a user break interrupt when a cpu instruction fetch condition is satisfied. when a condition occurs in an overrun fetch instruction as described in section 8.5.2, instruction fetch at branches, a user break interrupt is not requested but a trigger is output from the ubctrg pin. in other cpu data accesses and dmac bus cycles, pulse output is performed under conditions similar to user break interrupt conditions. setting the user break interrupt disable (ubid) bit to 1 in ubcr enables trigger output to be monitored externally without requesting a user break interrupt.
rev. 3.0, 09/04, page 140 of 1086 8.5.6 module standby after a power-on reset the ubc is in the module standby state, in which the clock supply is halted. when using the ubc, the module standby state must be cleared before making ubc register settings. module standby is controlled by the system control register 2 (syscr2). see section 25.2.3, system control register 2 (syscr2), for further details. 8.5.7 internal clock ( ) multiplication ratio and ubctrg ubctrg ubctrg ubctrg pulse width the user break controller operates in synchronization with an internal clock ( ) which is four or eight times an input clock. even when the same kind of clock is selected by clock select 1 and 0 (cks1 and cks0) in the user break control register (ubcr), the output pulse width of ubctrg is changed according to the internal clock ( ) multiplication ratio (an internal clock is eight or four times an input clock). when the multiplication ratio is changed during the ubctrg pulse output, pulse width of ubctrg is changed simultaneously.
rev. 3.0, 09/04, page 141 of 1086 section 9 bus state controller (bsc) 9.1 overview the bus state controller (bsc) divides up the address spaces and outputs control for various types of memory. this enables memories like sram and rom to be linked directly to the chip without external circuitry, simplifying system design and enabling high-speed data transfer to be achieved in a compact system. 9.1.1 features the bsc has the following features: ? address space is divided into four spaces ? a maximum linear 2 mbytes for on-chip rom effective mode, and a maximum 4 mbytes for on-chip rom disabled mode, for address space cs0 ? a maximum linear 4 mbytes for each of address spaces cs1?cs3 ? bus width can be selected for each space (8 or 16 bits) ? wait states can be inserted by software for each space ? wait state insertion with wait pin in external memory space access ? outputs control signals for each space according to the type of memory connected ? on-chip rom and ram interfaces ? on-chip ram access of 32 bits in 1 state ? on-chip rom access of 32 bits in 1 state for a read and 2 states for a write
rev. 3.0, 09/04, page 142 of 1086 9.1.2 block diagram figure 9.1 shows the bsc block diagram. ramer wcr bcr1 bcr2 internal bus module bus bus interface on-chip memory control unit memory control unit wait control unit area control unit , ? bsc wcr: wait control register ramer: ram emulation register bcr1: bus control register 1 bcr2: bus control register 2 figure 9.1 bsc block diagram
rev. 3.0, 09/04, page 143 of 1086 9.1.3 pin configuration table 9.1 shows the bus state controller pin configuration. table 9.1 pin configuration name abbr. i/o description address bus a21?a0 o address output data bus d15?d0 i/o 16-bit data bus chip select cs0 ? cs3 o chip select signals indicating the area being accessed read rd o strobe that indicates the read cycle for ordinary space/multiplex i/o upper write wrh o strobe that indicates a write c y cle to the upper 8 bits (d15?d8) lower write wrl o strobe that indicates a write c y cle to the lower 8 bits (d7?d0) wait wait i wait state request signal bus request breq i bus release request input bus acknowledge back o bus use enable output notes: 1. when an 8-bit bus width is selected for external space, wrl is enabled. 2. when a 16-bit bus width is selected for external space, wrh and wrl are enabled. 9.1.4 register configuration the bsc has four registers. these registers are used to control wait states, bus width, and interfaces with memories like rom and sram, as well as refresh control. the register configurations are listed in table 9.2. all registers are 16 bits. all bsc registers are all initialized by a power-on reset and in hardware standby mode. values are retained in a manual reset and in software standby mode. table 9.2 register configuration name abbr. r/w initial value address access size bus control register 1 bcr1 r/w h'000f h'ffffec20 8, 16, 32 bus control register 2 bcr2 r/w h'ffff h'ffffec22 8, 16, 32 wait state control register wcr r/w h'7777 h'ffffec24 8, 16, 32 ram emulation register ramer r/w h'0000 h'ffffec26 8, 16, 32 note: in register access, four cycles are required for byte access and word access, and eight cycles for longword access.
rev. 3.0, 09/04, page 144 of 1086 9.1.5 address map figure 9.2 shows the address format used by the sh7058. a31 ? a24 a23, a22 a21 output address: output from the address pins space selection: not output externally; used to select the type of space on-chip rom space or cs0 to cs3 space when 00000000 (h'00) reserved (do not access) when 00000001 to 11111110 (h'01 to h'fe) on-chip peripheral module space or on-chip ram space when 11111111 (h'ff) cs space selection: decoded, outputs to when a31 to a24 = 00000000 a0 figure 9.2 address format this chip uses 32-bit addresses: ? bits a31 to a24 are used to select the type of space and are not output externally. ? bits a23 and a22 are decoded and output as chip select signals ( cs0 to cs3 ) for the corresponding areas when bits a31 to a24 are 00000000. ? a21 to a0 are output externally. table 9.3 shows the address map.
rev. 3.0, 09/04, page 145 of 1086 table 9.3 address map ? on-chip rom enabled mode address space memory size bus width h'0000 0000 to h'000f ffff on-chip rom on-chip rom 1 mb 32 bits h'0010 0000 to h'001f ffff reserved reserved h'0020 0000 to h'003f ffff cs0 space external space 2 mb 8, 16 bits * 1 h'0040 0000 to h'007f ffff cs1 space external space 4 mb 8, 16 bits * 1 h'0080 0000 to h'00bf ffff cs2 space external space 4 mb 8, 16 bits * 1 h'00c0 0000 to h'00ff ffff cs3 space external space 4 mb 8, 16 bits * 1 h'0100 0000 to h'fffe ffff reserved reserved h'ffff 0000 to h'ffff bfff on-chip ram on-chip ram 48 kb 32 bits h'ffff c000 to h'ffff ffff on-chip peripheral module on-chip peripheral module 16 kb 8, 16 bits ? on-chip rom disabled mode address space memory size bus width h'0000 0000 to h'003f ffff cs0 space external space 4 mb 8, 16 bits * 2 h'0040 0000 to h'007f ffff cs1 space external space 4 mb 8, 16 bits * 1 h'0080 0000 to h'00bf ffff cs2 space external space 4 mb 8, 16 bits * 1 h'00c0 0000 to h'00ff ffff cs3 space external space 4 mb 8, 16 bits * 1 h'0100 0000 to h'fffe ffff reserved reserved h'ffff 0000 to h'ffff bfff on-chip ram on-chip ram 48 kb 32 bits h'ffff c000 to h'ffff ffff on-chip peripheral module on-chip peripheral module 16 kb 8, 16 bits notes: 1. selected by on-chip register (bcr1) settings. 2. selected by the mode pin. do not access reserved spaces. operation cannot be guaranteed if they are accessed.
rev. 3.0, 09/04, page 146 of 1086 ? number of access cycles for on-chip peripheral module registers number of access cycles module name bus width multiplication ratio of 4 multiplication ratio of 8 rom 8 byte: 4 byte: 4 ubc, wdt, bsc, dmac, and intc 16 byte and word: 4, longword: 8 byte and word: 4, longword: 8 sci 8 byte: 4 or 5, word: 8 or 9 byte: 8 to 11, word: 16 to 19 atu, apc, cmt, pfc, i/o ports, h-udi, cpg, and power-down 16 byte and word: 4 or 5, longword: 8 or 9 byte and word: 8 to 11, longword: 16 to 19 ad and mtad 8 byte: 6 or 7, word: 12 or 13 byte: 12 to 15, word: 24 to 27 hcan 16 byte and word: 6 or 7 + wait, longword: 12 or 13 + wait byte and word: 12 to 15 + wait, longword: 24 to 27 + wait 9.2 description of registers 9.2.1 bus control register 1 (bcr1) bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ? initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r bit: 7 6 5 4 3 2 1 0 ? ? ? ? a3sz a2sz a1sz a0sz initial value: 0 0 0 0 1 1 1 1 r/w: r r r r r/w r/w r/w r/w bcr1 is a 16-bit readable/writable register that specifies the bus size of the cs spaces. write bits 15?0 of bcr1 during the initialization stage after a power-on reset, and do not change the values thereafter. in on-chip rom enabled mode, do not access any of the cs spaces until after completion of register initialization. in on-chip rom disabled mode, do not access any cs space other than cs0 until after completion of register initialization. bcr1 is initialized to h'000f by a power-on reset and in hardware standby mode. it is not initialized by a manual reset or in software standby mode.
rev. 3.0, 09/04, page 147 of 1086 ? bits 15?4?reserved: the write value should always be 0. operation cannot be guaranteed if 1 is written to these bits. ? bit 3?cs3 space size specification (a3sz): specifies the cs3 space bus size. a 0 setting specifies byte (8-bit) size, and a 1 setting specifies word (16-bit) size. bit 3: a3sz description 0 byte (8-bit) size 1 word (16-bit) size (initial value) ? bit 2?cs2 space size specification (a2sz): specifies the cs2 space bus size. a 0 setting specifies byte (8-bit) size, and a 1 setting specifies word (16-bit) size. bit 2: a2sz description 0 byte (8-bit) size 1 word (16-bit) size (initial value) ? bit 1?cs1 space size specification (a1sz): specifies the cs1 space bus size. a 0 setting specifies byte (8-bit) size, and a 1 setting specifies word (16-bit) size. bit 1: a1sz description 0 byte (8-bit) size 1 word (16-bit) size (initial value) ? bit 0?cs0 space size specification (a0sz): specifies the cs0 space bus size a 0 setting specifies byte (8-bit) size, and a 1 setting specifies word (16-bit) size. bit 0: a0sz description 0 byte (8-bit) size 1 word (16-bit) size (initial value) note: a0sz is valid only in on-chip rom enabled mode. in on-chip rom disabled mode, the cs0 space bus size is specified by the mode pin.
rev. 3.0, 09/04, page 148 of 1086 9.2.2 bus control register 2 (bcr2) bit: 15 14 13 12 11 10 9 8 iw31 iw30 iw21 iw20 iw11 iw10 iw01 iw00 initial value: 1 1 1 1 1 1 1 1 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit: 7 6 5 4 3 2 1 0 cw3 cw2 cw1 cw0 sw3 sw2 sw1 sw0 initial value: 1 1 1 1 1 1 1 1 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bcr2 is a 16-bit readable/writable register that specifies the number of idle cycles and cs signal assert extension of each cs space. bcr2 is initialized to h'ffff by a power-on reset and in hardware standby mode. it is not initialized by a manual reset or in software standby mode. ? bits 15?8?idles between cycles (iw31, iw30, iw21, iw20, iw11, iw10, iw01, iw00): these bits specify idle cycles inserted between consecutive accesses when the second one is to a different cs area after a read. idles are used to prevent data conflict between rom (and other memories, which are slow to turn the read data buffer off), fast memories, and i/o interfaces. even when access is to the same area, idle cycles must be inserted when a read access is followed immediately by a write access. the idle cycles to be inserted comply with the area specification of the previous access . refer to section 9.4, waits between access cycles, for details. iw31, iw30 specify the idle between cycles for cs3 space; iw21, iw20 specify the idle between cycles for cs2 space; iw11, iw10 specify the idle between cycles for cs1 space and iw01, iw00 specify the idle between cycles for cs0 space. bit 15: iw31 bit 14: iw30 description 0 no cs3 space idle cycle 0 1 inserts one idle cycle 0 inserts two idle cycles 1 1 inserts three idle cycles (initial value)
rev. 3.0, 09/04, page 149 of 1086 bit 13: iw21 bit 12: iw20 description 0 no cs2 space idle cycle 0 1 inserts one idle cycle 0 inserts two idle cycles 1 1 inserts three idle cycles (initial value) bit 11: iw11 bit 10: iw10 description 0 no cs1 space idle cycle 0 1 inserts one idle cycle 0 inserts two idle cycles 1 1 inserts three idle cycles (initial value) bit 9: iw01 bit 8: iw00 description 0 no cs0 space idle cycle 0 1 inserts one idle cycle 0 inserts two idle cycles 1 1 inserts three idle cycles (initial value) ? bits 7?4?idle specification for continuous access (cw3, cw2, cw1, cw0): the continuous access idle specification makes insertions to clearly delineate the bus intervals by once negating the csn signal when performing consecutive accesses to the same cs space. when a write immediately follows a read, the number of idle cycles inserted is the larger of the two values specified by iw and cw. refer to section 9.4, waits between access cycles, for details. cw3 specifies the continuous access idles for cs3 space; cw2 specifies the continuous access idles for cs2 space; cw1 specifies the continuous access idles for cs1 space and cw0 specifies the continuous access idles for cs0 space. bit 7: cw3 description 0 no cs3 space continuous access idle cycles 1 one cs3 space continuous access idle cycle (initial value) bit 6: cw2 description 0 no cs2 space continuous access idle cycles 1 one cs2 space continuous access idle cycle (initial value)
rev. 3.0, 09/04, page 150 of 1086 bit 5: cw1 description 0 no cs1 space continuous access idle cycles 1 one cs1 space continuous access idle cycle (initial value) bit 4: cw0 description 0 no cs0 space continuous access idle cycles 1 one cs0 space continuous access idle cycle (initial value) ? bits 3?0? cs assert extension specification (sw3, sw2, sw1, sw0): the cs assert cycle extension specification is for making insertions to prevent extension of the rd signal, wrh signal, or wrl signal assert period beyond the length of the csn signal assert period. extended cycles insert one cycle before and after each bus cycle, which simplifies interfaces with external devices and also has the effect of extending the write data hold time. refer to section 9.3.3, cs assert period extension, for details. sw3 specifies the cs assert extension for cs3 space access; sw2 specifies the cs assert extension for cs2 space access; sw1 specifies the cs assert extension for cs1 space access and sw0 specifies the cs assert extension for cs0 space access. bit 3: sw3 description 0 no cs3 space cs assert extension 1 cs3 space cs assert extension (initial value) bit 2: sw2 description 0 no cs2 space cs assert extension 1 cs2 space cs assert extension (initial value) bit 1: sw1 description 0 no cs1 space cs assert extension 1 cs1 space cs assert extension (initial value) bit 0: sw0 description 0 no cs0 space cs assert extension 1 cs0 space cs assert extension (initial value)
rev. 3.0, 09/04, page 151 of 1086 9.2.3 wait control register (wcr) bit: 15 14 13 12 11 10 9 8 ? w32 w31 w30 ? w22 w21 w20 initial value: 0 1 1 1 0 1 1 1 r/w: r r/w r/w r/w r r/w r/w r/w bit: 7 6 5 4 3 2 1 0 ? w12 w11 w10 ? w02 w01 w00 initial value: 0 1 1 1 0 1 1 1 r/w: r r/w r/w r/w r r/w r/w r/w wcr is a 16-bit readable/writable register that specifies the number of wait cycles for each cs space. wcr is initialized to h'7777 by a power-on reset and in hardware standby mode. it is not initialized by a manual reset or in software standby mode. ? bit 15?reserved ? bits 14?12?cs3 space wait specification (w32, w31, w30): these bits specify the number of waits for cs3 space access. bit 14: w32 bit 13: w31 bit 12: w30 description 0 0 0 no wait (external wait input disabled) 0 0 1 1 wait external wait input enabled ??? 1 1 1 7 wait external wait input enabled (initial value) ? bit 11?reserved ? bits 10?8?cs2 space wait specification (w22, w21, w20): these bits specify the number of waits for cs2 space access. bit 10: w22 bit 9: w21 bit 8: w20 description 0 0 0 no wait (external wait input disabled) 0 0 1 1 wait external wait input enabled ??? 1 1 1 7 wait external wait input enabled (initial value)
rev. 3.0, 09/04, page 152 of 1086 ? bit 7?reserved ? bits 6?4?cs1 space wait specification (w12, w11, w10): these bits specify the number of waits for cs1 space access. bit 6: w12 bit 5: w11 bit 4: w10 description 0 0 0 no wait (external wait input disabled) 0 0 1 1 wait external wait input enabled ??? 1 1 1 7 wait external wait input enabled (initial value) ? bit 3?reserved ? bits 2?0?cs0 space wait specification (w02, w01, w00): these bits specify the number of waits for cs0 space access. bit 2: w02 bit 1: w01 bit 0: w00 description 0 0 0 no wait (external wait input disabled) 0 0 1 1 wait external wait input enabled ??? 1 1 1 7 wait external wait input enabled (initial value) 9.2.4 ra m e m u l at i o n r e g i s ter ( r a m e r ) bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ? initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r bit: 7 6 5 4 3 2 1 0 ? ? ? ? rams ram2 ram1 ram0 initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r/w r/w r/w r/w the ram emulation register (ramer) is a 16-bit readable/writable register that selects the ram area to be used when emulating realtime programming of flash memory. ramer is initialized to h'0000 by a power-on reset and in hardware standby mode. it is not initialized by a manual reset or in software standby mode.
rev. 3.0, 09/04, page 153 of 1086 note: to ensure correct operation of the ram emulation function, the rom for which ram emulation is performed should not be accessed immediately after this register has been modified. operation cannot be guaranteed if such an access is made. ? bits 15 to 4?reserved: only 0 should be written to these bits. operation cannot be guaranteed if 1 is written. ? bit 3?ram select (rams): used together with bits 2 to 0 to select or deselect flash memory emulation by ram (table 9.4). when 1 is written to this bit, all flash memory blocks are write/erase-protected. this bit is ignored in modes with on-chip rom disabled. ? bits 2 to 0?ram area specification (ram2 to ram0): these bits are used together with the rams bit to designate the flash memory area to be overlapped onto ram (table 9.4). table 9.4 ram area setting method ram area bit 3: rams bit 2: ram2 bit 1: ram1 bit 0: ram0 h'ffff0000 to h'ffff0fff 0 *** h'00000000 to h'00000fff 1000 h'00001000 to h'00001fff 1001 h'00002000 to h'00002fff 1010 h'00003000 to h'00003fff 1011 h'00004000 to h'00004fff 1100 h'00005000 to h'00005fff 1101 h'00006000 to h'00006fff 1110 h'00007000 to h'00007fff 1111 * : don?t care
rev. 3.0, 09/04, page 154 of 1086 9.3 accessing external space a strobe signal is output in external space accesses to provide primarily for sram or rom direct connections. 9.3.1 basic timing figure 9.3 shows the basic timing of external space access. external access bus cycles are performed in 2 states. t 1 ck address csn rd read write data , data t 2 figure 9.3 basic timing of external space access
rev. 3.0, 09/04, page 155 of 1086 9.3.2 wait state control the number of wait states inserted into external space access states can be controlled using the wcr settings (figure 9.4). the specified number of t w cycles are inserted as software cycles at the timing shown in figure 9.4. t 1 t w ck read write address data , data t 2 figure 9.4 wait state timing of external space access (software wait only)
rev. 3.0, 09/04, page 156 of 1086 when the wait is specified by software using wcr, the wait input wait signal from outside is sampled. figure 9.5 shows the wait signal sampling. the wait signal is sampled at the clock rise one cycle before the clock rise when the t w state shifts to the t 2 state. when using external waits, use a wcr setting of 1 state or more when extending cs assertion, and 2 states or more otherwise. t 1 t w ck read write address data , data t w t w 0 t 2 figure 9.5 wait state timing of external space access (two software wait states + wait wait wait wait signal wait state)
rev. 3.0, 09/04, page 157 of 1086 9.3.3 cs cs cs cs assert period extension idle cycles can be inserted to prevent extension of the rd , wrh , or wrl signal assert period beyond the length of the csn signal assert period by setting the sw3?sw0 bits of bcr2. this allows for flexible interfaces with external circuitry. the timing is shown in figure 9.6. t h and t f cycles are added respectively before and after the ordinary cycle. only csn is asserted in these cycles; rd , wrh, and wrl signals are not. further, data is extended up to the t f cycle, which is effective for gate arrays and the like, which have slower write operations. t h t 1 ck read write address data , data t 2 t f figure 9.6 cs cs cs cs assert period extension function
rev. 3.0, 09/04, page 158 of 1086 9.4 waits between access cycles when a read from a slow device is completed, data buffers may not go off in time to prevent data conflicts with the next access. if there is a data conflict during memory access, the problem can be solved by inserting a wait in the access cycle. to enable detection of bus cycle starts, waits can be inserted between access cycles during continuous accesses of the same cs space by negating the csn signal once. 9.4.1 prevention of data bus conflicts for the two cases of write cycles after read cycles, and read cycles for a different area after read cycles, waits are inserted so that the number of idle cycles specified by the iw31 to iw00 bits of bcr2 occur. when idle cycles already exist between access cycles, only the number of empty cycles remaining beyond the specified number of idle cycles are inserted. figure 9.7 shows an example of idles between cycles. in this example, one idle between csn space cycles has been specified, so when a csm space write immediately follows a csn space read cycle, one idle cycle is inserted. ck data csn space read csm space write idle cycle , address t 1 t 2 t 1 t 2 t idle figure 9.7 idle cycle insertion example
rev. 3.0, 09/04, page 159 of 1086 iw31 and iw30 specify the number of idle cycles required after a cs3 space read either to read other external spaces, or for this chip, to perform write accesses. in the same manner, iw21 and iw20 specify the number of idle cycles after a cs2 space read, iw11 and iw10, the number after a cs1 space read, and iw01 and iw00, the number after a cs0 space read. 0 to 3 idle cycles can be specified. 9.4.2 simplification of bus cycle start detection for consecutive accesses to the same cs space, waits are inserted to provide the number of idle cycles designated by bits cw3 to cw0 in bcr2. however, in the case of a write cycle after a read, the number of idle cycles inserted will be the larger of the two values designated by the iw and cw bits. when idle cycles already exist between access cycles, waits are not inserted. figure 9.8 shows an example. a continuous access idle is specified for csn space, and csn space is consecutively write-accessed. ck , data csn space access csn space access idle cycle address t 1 t 2 t 1 t 2 t idle figure 9.8 same space consecutive access idle cycle insertion example
rev. 3.0, 09/04, page 160 of 1086 9.5 bus arbitration the sh7058 has a bus arbitration function that, when a bus release request is received from an external device, releases the bus to that device. it also has three internal bus masters, the cpu, dmac, and aud. the priority ranking for determining bus right transfer between these bus masters is: bus right request from external device > aud > dmac > cpu therefore, an external device that generates a bus request is given priority even if the request is made during a dmac burst transfer. the aud does not acquire the bus during dmac burst transfer, but at the end of the transfer. when the cpu has possession of the bus, the aud has higher priority than the dmac for bus acquisition. a bus request by an external device should be input at the breq pin. the signal indicating that the bus has been released is output from the back pin. figure 9.9 shows the bus right release procedure. = low sh7058 accepted strobe pin: high-level output address, data, strobe pin: high impedance bus right release response bus right release status external device bus right request confirmation bus right acquisition = low figure 9.9 bus right release procedure
rev. 3.0, 09/04, page 161 of 1086 9.6 memory connection examples figures 9.10?9.13 show examples of the memory connections. sh7058 32 k 8-bit a0 ? a14 d0 ? d7 a0 ? a14 i/o0 ? i/o7 rom figure 9.10 example of 8-bit data bus width rom connection sh7058 256 k 16-bit rom a0 a1 ? a18 d0 ? d15 a0 ? a17 i/o0 ? i/o15 figure 9.11 example of 16-bit data bus width rom connection sh7058 a0 ? a16 a0 ? a16 d0 ? d7 i/o0 ? i/o7 128 k 8-bit sram figure 9.12 example of 8-bit data bus width sram connection
rev. 3.0, 09/04, page 162 of 1086 sh7058 128 k 8-bit sram a0 a1 ? a17 a0 ? a16 d8 ? d15 i / o0 ? i/o7 d0 ? d7 a0 ? a16 i / o0 ? i/o7 figure 9.13 example of 16-bit data bus width sram connection
rev. 3.0, 09/04, page 163 of 1086 section 10 direct memory access controller (dmac) 10.1 overview the sh7058 includes an on-chip four-channel direct memory access controller (dmac). the dmac can be used in place of the cpu to perform high-speed data transfers among external memories, memory-mapped external devices, and on-chip peripheral modules (except for the dmac, bsc, and ubc). using the dmac reduces the burden on the cpu and increases the operating efficiency of the chip as a whole. 10.1.1 features the dmac has the following features: ? four channels ? 4-gbyte address space in the architecture ? 8-, 16-, or 32-bit selectable data transfer length ? maximum of 16 m (16,777,216) transfers ? address modes both the transfer source and transfer destination are accessed by address. there are two transfer modes: direct address and indirect address. ? direct address transfer mode: values set in a dmac internal register indicate the accessed address for both the transfer source and transfer destination. two bus cycles are required for one data transfer. ? indirect address transfer mode: the value stored at the location pointed to by the address set in the dmac internal transfer source register is used as the address. operation is otherwise the same as for direct access. this function can only be set for channel 3. four bus cycles are required for one data transfer. ? channel function: dual address mode is supported on all channels. channel 2 has a source address reload function that reloads the source address every fourth transfer. direct address transfer mode or indirect address transfer mode can be specified for channel 3. ? reload function enables automatic reloading of the value set in the first source address register every fourth dma transfer. this function can be executed on channel 2 only. ? transfer requests there are two dmac transfer activation requests, as indicated below.
rev. 3.0, 09/04, page 164 of 1086 ? requests from on-chip peripheral modules: transfer requests from on-chip modules such as the sci or a/d. these can be received by all channels. ? auto-request: the transfer request is generated automatically within the dmac. ? selectable bus modes: cycle-steal mode or burst mode ? fixed dmac channel priority ranking ? cpu can be interrupted when the specified number of data transfers are complete.
rev. 3.0, 09/04, page 165 of 1086 10.1.2 block diagram figure 10.1 is a block diagram of the dmac. on-chip rom peripheral bus internal bus on-chip ram hcan0 circuit control sarn dmac module register control activation control request priority control bus interface external bus bus state controller on-chip peripheral module darn dmatcrn chcrn dmaor atu-ii sci0?sci4 a/d converter 0?2 dein external rom external ram external i/o (memory mapped) sarn: darn: dmatcrn: chcrn: dmaor: n: dma source address register dma destination address register dma transfer count register dma channel control register dma operation register 0, 1, 2, 3 figure 10.1 dmac block diagram
rev. 3.0, 09/04, page 166 of 1086 10.1.3 register configuration table 10.1 summarizes the dmac registers. the dmac has a total of 17 registers. each channel has four registers, and one overall dmac control register is shared by all channels. table 10.1 dmac registers channel name abbr. r/w initial value address register size access size dma source address register 0 sar0 r/w undefined h'ffffecc0 32 bits 16, 32 * 2 dma destination address register 0 dar0 r/w undefined h'ffffecc4 32 bits 16, 32 * 2 dma transfer count register 0 dmatcr0 r/w undefined h'ffffecc8 32 bits 16, 32 * 2 0 dma channel control register 0 chcr0 r/w * 1 h'00000000 h'ffffeccc 32 bits 16, 32 * 2 dma source address register 1 sar1 r/w undefined h'ffffecd0 32 bits 16, 32 * 2 dma destination address register 1 dar1 r/w undefined h'ffffecd4 32 bits 16, 32 * 2 dma transfer count register 1 dmatcr1 r/w undefined h'ffffecd8 32 bits 16, 32 * 3 1 dma channel control register 1 chcr1 r/w * 1 h'00000000 h'ffffecdc 32 bits 16, 32 * 2 dma source address register 2 sar2 r/w undefined h'ffffece0 32 bits 16, 32 * 2 dma destination address register 2 dar2 r/w undefined h'ffffece4 32 bits 16, 32 * 2 dma transfer count register 2 dmatcr2 r/w undefined h'ffffece8 32 bits 16, 32 * 3 2 dma channel control register 2 chcr2 r/w * 1 h'00000000 h'ffffecec 32 bits 16, 32 * 2
rev. 3.0, 09/04, page 167 of 1086 table 10.1 dmac registers (cont) channel name abbr. r/w initial value address register size access size dma source address register 3 sar3 r/w undefined h'ffffecf0 32 bits 16, 32 * 2 dma destination address register 3 dar3 r/w undefined h'ffffecf4 32 bits 16, 32 * 2 dma transfer count register 3 dmatcr3 r/w undefined h'ffffecf8 32 bits 16, 32 * 3 3 dma channel control register 3 chcr3 r/w * 1 h'00000000 h'ffffecfc 32 bits 16, 32 * 2 shared dma operation register dmaor r/w * 1 h'0000 h'ffffecb0 16 bits 16 * 4 notes: word access to a register takes four cycles, and longword access eight cycles. do not attempt to access an empty address, as operation canot be guaranteed if this is done. 1. write 0 after reading 1 in bit 1 of chcr0?chcr3 and in bits 1 and 2 of dmaor to clear flags. no other writes are allowed. 2. for 16-bit access of sar0?sar3, dar0?dar3, and chcr0?chcr3, the 16-bit value on the side not accessed is held. 3. dmatcr has a 24-bit configuration: bits 0?23. writing to the upper 8 bits (bits 24?31) is invalid, and these bits always read 0. 4. do not use 32-bit access on dmaor. 10.2 register descriptions 10.2.1 dma source address registers 0?3 (sar0?sar3) bit: 31 30 29 28 27 26 25 24 initial value: ? ? ? ? ? ? ? ? r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit: 23 22 21 ? ? 2 1 0 ? ? initial value: ? ? ? ? ? ? ? ? r/w: r/w r/w r/w ? ? r/w r/w r/w
rev. 3.0, 09/04, page 168 of 1086 dma source address registers 0?3 (sar0?sar3) are 32-bit readable/writable registers that specify the source address of a dma transfer. these registers have a count function, and during a dma transfer, they indicate the next source address. specify a 16-bit boundary when performing 16-bit data transfers, and a 32-bit boundary when performing 32-bit data transfers. operation cannot be guaranteed if any other addresses are set. the initial value after a power-on reset and in standby mode is undefined. 10.2.2 dma destination address registers 0?3 (dar0?dar3) bit: 31 30 29 28 27 26 25 24 initial value: ? ? ? ? ? ? ? ? r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit: 23 22 21 ? ? 2 1 0 ? ? initial value: ? ? ? ? ? ? ? ? r/w: r/w r/w r/w ? ? r/w r/w r/w dma destination address registers 0?3 (dar0?dar3) are 32-bit readable/writable registers that specify the destination address of a dma transfer. these registers have a count function, and during a dma transfer, they indicate the next destination address. specify a 16-bit boundary when performing 16-bit data transfers, and a 32-bit boundary when performing 32-bit data transfers. operation cannot be guaranteed if any other addresses are set. the value after a power-on reset and in standby mode is undefined.
rev. 3.0, 09/04, page 169 of 1086 10.2.3 dma transfer count registers 0?3 (dmatcr0?dmatcr3) bit: 31 30 29 28 27 26 25 24 ? ? ? ? ? ? ? ? initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r bit: 23 22 21 20 19 18 17 16 initial value: ? ? ? ? ? ? ? ? r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit: 15 14 13 12 11 10 9 8 initial value: ? ? ? ? ? ? ? ? r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit: 7 6 5 4 3 2 1 0 initial value: ? ? ? ? ? ? ? ? r/w: r/w r/w r/w r/w r/w r/w r/w r/w dma transfer count registers 0?3 (dmatcr0?dmatcr3) are 24-bit read/write registers that specify the transfer count for the channel (byte count, word count, or longword count) in bits 23 to 0. specifying h'000001 gives a transfer count of 1, while h'000000 gives the maximum setting, 16,777,216 transfers. during dmac operation, these registers indicate the remaining number of transfers. the upper 8 bits of dmatcr always read 0. the write value, also, should always be 0. the value after a power-on reset and in standby mode is undefined.
rev. 3.0, 09/04, page 170 of 1086 10.2.4 dma channel control registers 0?3 (chcr0?chcr3) bit: 31 30 29 28 27 26 25 24 ? ? ? di ? ? ? ro initial value: 0 0 0 0 0 0 0 0 r/w: r r r r/w * 2 r r r r/w * 2 bit: 23 22 21 20 19 18 17 16 ? ? ? rs4 rs3 rs2 rs1 rs0 initial value: 0 0 0 0 0 0 0 0 r/w: r r r r/w r/w r/w r/w * 1 r/w bit: 15 14 13 12 11 10 9 8 ? ? sm1 sm0 ? ? dm1 dm0 initial value: 0 0 0 0 0 0 0 0 r/w: r r r/w r/w r r r/w r/w bit: 7 6 5 4 3 2 1 0 ? ? ts1 ts0 tm ie te de initial value: 0 0 0 0 0 0 0 0 r/w: r r r/w r/w r/w r/w r/(w) * 1 r/w notes: 1. te bit: allows only a 0 write after reading 1. 2. the di and ro bits may be absent, depending on the channel. dma channel control registers 0?3 (chcr0?chcr3) are 32-bit readable/writable registers that designate the operation and transmission of each channel. chcr register bits are initialized to h'00000000 by a power-on reset and in standby mode.
rev. 3.0, 09/04, page 171 of 1086 ? bits 31?29, 27?25, 23?21, 15, 14, 11, 10, 7, 6?reserved: these bits are always read as 0. the write value should always be 0. ? bit 28?direct/indirect select (di): specifies either direct address mode operation or indirect address mode operation for the channel 3 source address. this bit is valid only in chcr3. this bit is always read as 0 in chcr0?chcr2, and the write value should always be 0. bit 28: di description 0 direct access mode operation for channel 3 (initial value) 1 indirect access mode operation for channel 3 ? bit 24?source address reload (ro): selects whether to reload the source address initial value during channel 2 transfer. this bit is valid only for channel 2. this bit is always read as 0 in chcr0, chcr1, and chcr3, and the write value should always be 0. bit 24: ro description 0 does not reload source address (initial value) 1 reloads source address
rev. 3.0, 09/04, page 172 of 1086 ? bits 20?16?resource select 4?0 (rs4?rs0): these bits specify the transfer request source. bit 20: rs4 bit 19: rs3 bit 18: rs2 bit 17: rs1 bit 16: rs0 description 0 no request * (initial value) 0 1 sci0 transmission 0 sci0 reception 0 1 1 sci1 transmission 0 sci1 reception 0 1 sci2 transmission 0 sci2 reception 0 1 1 1 sci3 transmission 0 sci3 reception 0 1 sci4 transmission 0 sci4 reception 0 1 1 on-chip a/d0 0 on-chip a/d1 0 1 on-chip a/d2 0 no request * 0 1 1 1 1 hcan0 (rm0) 0 no request * 0 1 atu-ii (ici0a) 0 atu-ii (ici0b) 0 1 1 atu-ii (ici0c) 0 atu-ii (ici0d) 0 1 atu-ii (cmi6a) 0 atu-ii (cmi6b) 0 1 1 1 atu-ii (cmi6c) 0 atu-ii (cmi6d) 0 1 atu-ii (cmi7a) 0 atu-ii (cmi7b) 0 1 1 atu-ii (cmi7c) 0 atu-ii (cmi7d) 0 1 no request * 0 no request * 1 1 1 1 1 auto-request note: * refer to no. 12 in section 10.5, usage notes.
rev. 3.0, 09/04, page 173 of 1086 ? bits 13 and 12?source address mode 1, 0 (sm1, sm0): these bits specify increment/decrement of the dma transfer source address. bit 13: sm1 bit 12: sm0 description 0 0 source address fixed (initial value) 0 1 source address incremented (+1 during 8-bit transfer, +2 during 16-bit transfer, +4 during 32-bit transfer) 1 0 source address decremented (?1 during 8-bit transfer, ?2 during 16-bit transfer, ?4 during 32-bit transfer) 1 1 setting prohibited when the transfer source is specified at an indirect address, specify in source address register 3 (sar3) the actual storage address of the data to be transferred as the data storage address (indirect address). during indirect address mode, sar3 obeys the sm1/sm0 setting for increment/decrement. in this case, sar3?s increment/decrement is fixed at +4/?4 or 0, irrespective of the transfer data size specified by ts1 and ts0. ? bits 9 and 8?destination address mode 1, 0 (dm1, dm0): these bits specify increment/decrement of the dma transfer source address. bit 9: dm1 bit 8: dm0 description 0 0 destination address fixed (initial value) 0 1 destination address incremented (+1 during 8-bit transfer, +2 during 16-bit transfer, +4 during 32-bit transfer) 1 0 destination address decremented (?1 during 8-bit transfer, ?2 during 16-bit transfer, ?4 during 32-bit transfer) 1 1 setting prohibited ? bits 5 and 4?transfer size 1, 0 (ts1, ts0): these bits specify the size of the data for transfer. bit 5: ts1 bit 4: ts0 description 0 0 specifies byte size (8 bits) (initial value) 0 1 specifies word size (16 bits) 1 0 specifies longword size (32 bits) 1 1 setting prohibited
rev. 3.0, 09/04, page 174 of 1086 ? bit 3?transfer mode (tm): specifies the bus mode for data transfer. bit 3: tm description 0 cycle-steal mode (initial value) 1 burst mode ? bit 2?interrupt enable (ie): when this bit is set to 1, interrupt requests are generated after the number of data transfers specified in dmatcr (when te = 1). bit 2: ie description 0 interrupt request not generated on completion of dmatcr-specified number of transfers (initial value) 1 interrupt request enabled on completion of dmatcr-specified number of transfers ? bit 1?transfer end (te): this bit is set to 1 after the number of data transfers specified by dmatcr. at this time, if the ie bit is set to 1, an interrupt request is generated. if data transfer ends before te is set to 1 (for example, due to an nmi or address error, or clearing of the de bit or dme bit of dmaor) te is not set to 1. with this bit set to 1, data transfer is disabled even if the de bit is set to 1. bit 1: te description 0 dmatcr-specified number of transfers not completed (initial value) [clearing condition] 0 write after te = 1 read, power-on reset, standby mode 1 dmatcr-specified number of transfers completed ? bit 0?dmac enable (de): de enables operation in the corresponding channel. bit 0: de description 0 operation of the corresponding channel disabled (initial value) 1 operation of the corresponding channel enabled transfer is initiated if this bit is set to 1 when auto-request is specified (rs4?rs0 settings). with an on-chip module request, when a transfer request occurs after this bit is set to 1, transfer is initiated. if this bit is cleared during a data transfer, transfer is suspended. if the de bit has been set, but te = 1, then if the dme bit of dmaor is 0, and the nmif or ae bit of dmaor is 1, the transfer enable state is not entered.
rev. 3.0, 09/04, page 175 of 1086 10.2.5 dmac operation register (dmaor) bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ? initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r bit: 7 6 5 4 3 2 1 0 ? ? ? ? ? ae nmif dme initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r/(w) * r/(w) * r/w note: * only a 0 write is valid after 1 is read at the ae and nmif bits. dmaor is a 16-bit readable/writable register that controls the overall operation of the dmac. register values are initialized to h'0000 by a power-on reset and in standby mode. ? bits 15?3?reserved: these bits are always read as 0. the write value should always be 0. ? bit 2?address error flag (ae): indicates that an address error has occurred during dma transfer. if this bit is set during a data transfer, transfers on all channels are suspended. the cpu cannot write a 1 to the ae bit. clearing is effected by a 0 write after a 1 read. bit 2: ae description 0 no address error, dma transfer enabled (initial value) [clearing condition] write ae = 0 after reading ae = 1 1 address error, dma transfer disabled [setting condition] address error due to dmac
rev. 3.0, 09/04, page 176 of 1086 ? bit 1?nmi flag (nmif): indicates input of an nmi. this bit is set irrespective of whether the dmac is operating or suspended. if this bit is set during a data transfer, transfers on all channels are suspended. the cpu is unable to write a 1 to the nmif. clearing is effected by a 0 write after a 1 read. bit 1: nmif description 0 no nmi interrupt, dma transfer enabled (initial value) [clearing condition] write nmif = 0 after reading nmif = 1 1 nmi has occurred, dmc transfer disabled [setting condition] nmi interrupt occurrence ? bit 0?dmac master enable (dme): this bit enables activation of the entire dmac. when the dme bit and de bit of the chcr register for the corresponding channel are set to 1, that channel is transfer-enabled. if this bit is cleared during a data transfer, transfers on all channels are suspended. even when the dme bit is set, when the te bit of chcr is 1, or its de bit is 0, transfer is disabled if the nmif or ae bit in dmaor is set to 1. bit 0: dme description 0 operation disabled on all channels (initial value) 1 operation enabled on all channels
rev. 3.0, 09/04, page 177 of 1086 10.3 operation when there is a dma transfer request, the dmac starts the transfer according to the channel priority order; when the transfer end conditions are satisfied, it ends the transfer. transfers can be requested in two modes: auto-request and on-chip peripheral module request. transfer is performed only in dual address mode, and either direct or indirect address transfer mode can be used. the bus mode can be either burst or cycle-steal. 10.3.1 dma transfer flow after the dma source address registers (sar), dma destination address registers (dar), dma transfer count register (dmatcr), dma channel control registers (chcr), and dma operation register (dmaor) are set to the desired transfer conditions, the dmac transfers data according to the following procedure: 1. the dmac checks to see if transfer is enabled (de = 1, dme = 1, te = 0, nmif = 0, ae = 0). 2. when a transfer request comes and transfer has been enabled, the dmac transfers 1 transfer unit of data (determined by the ts0 and ts1 setting). for an auto-request, the transfer begins automatically when the de bit and dme bit are set to 1. the dmatcr value will be decremented by 1 upon each transfer. the actual transfer flows vary by address mode and bus mode. 3. when the specified number of transfers have been completed (when dmatcr reaches 0), the transfer ends normally. if the ie bit of chcr is set to 1 at this time, a dei interrupt is sent to the cpu. 4. when an address error occurs in the dmac or an nmi interrupt is generated, the transfer is aborted. transfer is also aborted when the de bit of chcr or the dme bit of dmaor is cleared to 0.
rev. 3.0, 09/04, page 178 of 1086 figure 10.2 is a flowchart of this procedure. normal end does nmif = 1, ae = 1, de = 0, or dme = 0? bus mode initial settings (sar, dar, dmatcr, chcr, dmaor) transfer (1 transfer unit); dmatcr ? 1 dmatcr, sar, and dar updated dei interrupt request (when ie = 1) no yes no yes no yes yes no yes no * 3 * 2 start transfer aborted notes: 1. 2. 3. in auto-request mode, transfer begins when nmif, ae, and te are all 0, and the de and dme bits are set to 1. cycle-steal mode burst mode dmatcr = 0? transfer request occurs? * 1 de, dme = 1 and nmif, ae, te = 0? does nmif = 1, ae = 1, de = 0, or dme = 0? transfer ends figure 10.2 dmac transfer flowchart
rev. 3.0, 09/04, page 179 of 1086 10.3.2 dma transfer requests dma transfer requests are generated in either the data transfer source or destination. transfers can be requested in two modes: auto-request and on-chip peripheral module request. the request mode is selected in the rs4 ? rs0 bits of dma channel control registers 0 ? 3 (chcr0 ? chcr3). auto-request mode: when there is no transfer request signal from an external source, as in a memory-to-memory transfer or a transfer between memory and an on-chip peripheral module unable to request a transfer, the auto-request mode allows the dmac to automatically generate a transfer request signal internally. when the de bits of chcr0 ? chcr3 and the dme bit of dmaor are set to 1, the transfer begins (so long as the te bits of chcr0 ? chcr3 and the nmif and ae bits of dmaor are all 0). on-chip peripheral module request mode: in this mode a transfer is performed at the transfer request signal (interrupt request signal) of an on-chip peripheral module. as indicated in table 10.2, there are 26 transfer request signals: 12 from the advanced timer unit (atu-ii), which are compare match or input capture interrupts; the receive data full interrupts (rxi) and transmit data empty interrupts (txi) of the five serial communication interfaces (sci); the receive interrupt of hcan0; and the a/d conversion end interrupts (adi) of the three a/d converters. when dma transfers are enabled (de = 1, dme = 1, te = 0, nmif = 0, ae = 0), a transfer is performed upon the input of a transfer request signal. when the transfer request is set to rxi (transfer request because the sci ? s receive data register is full), the transfer source must be the sci ? s receive data register (rdr). when the transfer request is set to txi (transfer request because the sci ? s transmit data register is empty), the transfer destination must be the sci ? s transmit data register (tdr). if the transfer request is set to the a/d converter, the data transfer source must be the a/d converter register; if set to hcan0, the transfer source must be hcan0 message data. in on-chip peripheral module request mode, when the dmac accepts the transfer request, the next transfer request is ignored until a single transfer ends in cycle steal mode or all transfers end in burst mode. only when the address reload function is used, the next transfer request is accepted after the fourth transfer.
rev. 3.0, 09/04, page 180 of 1086 table 10.2 selecting on-chip peripheral module request modes with the rs bits rs4 rs3 rs2 rs1 rs0 dmac transfer request source dmac transfer request signal transfer source transfer destination bus mode 0 1 sci0 transmit block txi0 (sci0 transmit- data-empty transfer request) don?t care * tdr0 burst/cycle- steal 0 sci0 receive block rxi0 (sci0 receive- data-full transfer request) rdr0 don?t care * burst/cycle- steal 0 1 1 sci1 transmit block txi1 (sci1 transmit- data-empty transfer request) don?t care * tdr1 burst/cycle- steal 0 sci1 receive block rxi1 (sci1 receive- data-full transfer request) rdr1 don?t care * burst/cycle- steal 0 1 sci2 transmit block txi2 (sci2 transmit- data-empty transfer request) don?t care * tdr2 burst/cycle- steal 0 sci2 receive block rxi2 (sci2 receive- data-full transfer request) rdr2 don?t care * burst/cycle- steal 0 1 1 1 sci3 transmit block txi3 (sci3 transmit- data-empty transfer request) don?t care * tdr3 burst/cycle- steal 0 sci3 receive block rxi3 (sci3 receive- data-full transfer request) rdr3 don?t care * burst/cycle- steal 0 1 sci4 transmit block txi4 (sci4 transmit- data-empty transfer request) don?t care * tdr4 burst/cycle- steal 0 sci4 receive block rxi4 (sci4 receive- data-full transfer request) rdr4 don?t care * burst/cycle- steal 0 1 1 a/d0 adi0 (a/d0 conversion end interrupt) addr0? addr11 don?t care * burst/cycle- steal 0 a/d1 adi1 (a/d1 conversion end interrupt) addr12? addr23 don?t care * burst/cycle- steal 0 1 a/d2 adi2 (a/d2 conversion end interrupt) addr24? addr31 don?t care * burst/cycle- steal 0 1 1 1 1 hcan0 rm0 (hcan0 receive interrupt) mb0?mb15 don?t care * burst/cycle- steal
rev. 3.0, 09/04, page 181 of 1086 table 10.2 selecting on-chip peripheral module request modes with the rs bits (cont) rs4 rs3 rs2 rs1 rs0 dmac transfer request source dmac transfer request signal transfer source transfer destination bus mode 0 1 atu-ii ici0a (icr0a input capture generation) don?t care * don?t care * burst/cycle- steal 0 atu-ii ici0b (icr0b input capture generation) don?t care * don?t care * burst/cycle- steal 0 1 1 atu-ii ici0c (icr0c input capture generation) don?t care * don?t care * burst/cycle- steal 0 atu-ii ici0d (icr0d input capture generation) don?t care * don?t care * burst/cycle- steal 0 1 atu-ii cmi6a (cylr6a compare-match generation) don?t care * don?t care * burst/cycle- steal 0 atu-ii cmi6b (cylr6b compare-match generation) don?t care * don?t care * burst/cycle- steal 0 1 1 1 atu-ii cmi6c (cylr6c compare-match generation) don?t care * don?t care * burst/cycle- steal 0 atu-ii cmi6d (cylr6d compare-match generation) don?t care * don?t care * burst/cycle- steal 0 1 atu-ii cmi7a (cylr7a compare-match generation) don?t care * don?t care * burst/cycle- steal 0 atu-ii cmi7b (cylr7b compare-match generation) don?t care * don?t care * burst/cycle- steal 0 1 1 atu-ii cmi7c (cylr7c compare-match generation) don?t care * don?t care * burst/cycle- steal 1 1 1 0 0 atu-ii cmi7d (cylr7d compare-match generation) don?t care * don?t care * burst/cycle- steal
rev. 3.0, 09/04, page 182 of 1086 legend: sci0, sci1, sci2, sci3, sci4: serial communication interface channels 0?4 a/d0, a/d1, a/d2: a/d converter channels 0?2 hcan0: controller area network-ii channel 0 atu-ii: advanced timer unit tdr0, tdr1, tdr2, tdr3, tdr4: sci0?sci4 transmit data registers rdr0, rdr1, rdr2, rdr3, rdr4: sci0?sci4 receive data registers addr0?addr11: a/d0 data registers addr12?addr23: a/d1 data registers addr24?addr31: a/d2 data registers mb0?mb15: hcan0 message data note: * external memory, memory-mapped external device, on-chip memory, on-chip peripheral module (excluding dmac, bsc, and ubc) 10.3.3 channel priority when the dmac receives simultaneous transfer requests on two or more channels, it selects a channel according to the following priority order: ? ch0 > ch1 > ch2 > ch3 10.3.4 dma transfer types the dmac supports the transfers shown in table 10.3. it operates in dual address mode, in which both the transfer source and destination addresses are output. the dual address mode consists of a direct address mode, in which the output address value is the object of a direct data transfer, and an indirect address mode, in which the output address value is not the object of the data transfer, but the value stored at the output address becomes the transfer object address. the actual transfer operation timing varies with the bus mode. the dmac has two bus modes: cycle-steal mode and burst mode. table 10.3 supported dma transfers transfer destination transfer source external memory memory-mapped external device on-chip memory on-chip peripheral module external memory supported supported supported supported memory-mapped external device supported supported supported supported on-chip memory supported supported supported supported on-chip peripheral module supported supported supported supported
rev. 3.0, 09/04, page 183 of 1086 10.3.5 dual address mode dual address mode is used for access of both the transfer source and destination by address. transfer source and destination can be accessed either internally or externally. dual address mode is subdivided into two other modes: direct address transfer mode and indirect address transfer mode. direct address transfer mode: data is read from the transfer source during the data read cycle, and written to the transfer destination during the write cycle, so transfer is conducted in two bus cycles. at this time, the transfer data is temporarily stored in the dmac. with the kind of external memory transfer shown in figure 10.3, data is read from one of the memories by the dmac during a read cycle, then written to the other external memory during the subsequent write cycle. figure 10.4 shows the timing for this operation.
rev. 3.0, 09/04, page 184 of 1086 data buffer address bus data bus address bus data bus memory transfer source module transfer destination module memory transfer source module transfer destination module sar dar data buffer sar dar the sar value is taken as the address, and data is read from the transfer source module and stored temporarily in the dmac. 1st bus cycle 2nd bus cycle the dar value is taken as the address, and data stored in the dmac's data buffer is written to the transfer destination module. dmac dmac figure 10.3 direct address operation in dual address mode
rev. 3.0, 09/04, page 185 of 1086 transfer destination address transfer source address ck a21 ? a0 csn d15 ? d0 rd wrh, wrl figure 10.4 direct address transfer timing in dual address mode indirect address transfer mode: in this mode the memory address storing the data actually to be transferred is specified in the dmac internal transfer source address register (sar3). therefore, in indirect address transfer mode, the dmac internal transfer source address register value is read first. this value is first stored in the dmac. next, the read value is output as the address, and the value stored at that address is again stored in the dmac. finally, the subsequent read value is written to the address specified by the transfer destination address register, ending one cycle of dmac transfer. in indirect address mode (figure 10.5), the transfer destination, transfer source, and indirect address storage destination are all 16-bit external memory locations, and transfer in this example is conducted in 16-bit or 8-bit units. timing for this transfer example is shown in figure 10.6. in indirect address mode, one nop cycle (figure 10.6) is required until the data read as the indirect address is output to the address bus. when transfer data is 32-bit, the third and fourth bus cycles each need to be doubled, giving a required total of six bus cycles and one nop cycle for the whole operation.
rev. 3.0, 09/04, page 186 of 1086 sar3 dar3 data buffer address bus data bus memory transfer source module transfer destination module temporary buffer 1st and 2nd bus cycles 3rd bus cycle 4th bus cycle dmac sar3 dar3 data buffer address bus data bus memory transfer source module transfer destination module temporary buffer sar3 dar3 data buffer address bus data bus memory transfer source module transfer destination module temporary buffer note: memory, transfer source, and transfer destination modules are shown here. in practice, any connection can be made as long as it is within the address space. dmac dmac the sar3 value is taken as the address, memory data is read, and the value is stored in the temporary buffer. since the value read at this time is used as the address, it must be 32 bits. if data bus is 16 bits wide when accessed to an external memory space, two bus cycles are necessary. the value in the temporary buffer is taken as the address, and data is read from the transfer source module to the data buffer. the dar3 value is taken as the address, and the value in the data buffer is written to the transfer destination module. figure 10.5 dual address mode and indirect address operation (16-bit-width external memory space)
rev. 3.0, 09/04, page 187 of 1086 transfer source address (h) transfer source address (l) indirect address nop transfer destination address indirect address (h) indirect address (l) transfer data transfer data transfer data transfer data transfer data transfer source address ? 1 indirect address indirect address nop indirect address address read cycle (1st) (2nd) (3rd) nop cycle data read cycle (4th) data write cycle ck a21 ? a0 csn d15 ? d0 internal address bus internal data bus dmac indirect address buffer dmac data buffer rd wrh , wrl notes: 1. 2. the internal address bus is controlled by the port and does not change. the dmac does not latch the value until 32-bit data is read from the internal data bus. ? 2 figure 10.6 dual address mode and indirect address transfer timing example 1 external memory space external memory space (external memory space has 16-bit width)
rev. 3.0, 09/04, page 188 of 1086 figure 10.7 shows an example of timing in indirect address mode when transfer source and indirect address storage locations are in internal memory, the transfer destination is an on-chip peripheral module with 2-cycle access space, and transfer data is 8-bit. since the indirect address storage destination and the transfer source are in internal memory, these can be accessed in one cycle. the transfer destination is 2-cycle access space, so two data write cycles are required. one nop cycle is required until the data read as the indirect address is output to the address bus. internal address bus internal data bus dmac indirect address buffer dmac data buffer ck transfer source address nop nop indirect address transfer destination address indirect address indirect address transfer data transfer data transfer data address read cycle nop cycle data read cycle data write cycle (4th) (1st) (2nd) (3rd) figure 10.7 dual address mode and indirect address transfer timing example 2 internal memory space internal memory space
rev. 3.0, 09/04, page 189 of 1086 10.3.6 bus modes select the appropriate bus mode in the tm bits of chcr0 ? chcr3. there are two bus modes: cycle-steal and burst. cycle-steal mode: in cycle-steal mode, the bus right is given to another bus master after each one-transfer-unit (8-bit, 16-bit, or 32-bit) dmac transfer. when the next transfer request occurs, the bus right is obtained from the other bus master and a transfer is performed for one transfer unit. when that transfer ends, the bus right is passed to the other bus master. this is repeated until the transfer end conditions are satisfied. cycle-steal mode can be used with all categories of transfer destination, transfer source and transfer request. figure 10.8 shows an example of dma transfer timing in cycle-steal mode. cpu cpu cpu dmac dmac cpu dmac dmac cpu cpu bus cycle bus control returned to cpu read/write read/write figure 10.8 dma transfer timing example in cycle-steal mode burst mode: once the bus right is obtained, transfer is performed continuously until the transfer end condition is satisfied. figure 10.9 shows an example of dma transfer timing in burst mode. cpu cpu cpu dmac dmac dmac dmac dmac read/write read/write read/write bus cycle dmac cpu figure 10.9 dma transfer timing example in burst mode
rev. 3.0, 09/04, page 190 of 1086 10.3.7 relationship between request modes and bus modes by dma transfer category table 10.4 shows the relationship between request modes and bus modes by dma transfer category. table 10.4 relationship between request modes and bus modes by dma transfer category address mode transfer category request mode bus mode transfer size (bits) usable channels external memory and external memory any * 1 b/c 8/16/32 0?3 external memory and memory-mapped external device any * 1 b/c 8/16/32 0?3 memory-mapped external device and memory-mapped external device any * 1 b/c 8/16/32 0?3 external memory and on-chip memory any * 1 b/c 8/16/32 0?3 external memory and on-chip peripheral module any * 2 b/c * 3 8/16/32 * 4 0?3 memory-mapped external device and on-chip memory any * 1 b/c 8/16/32 0?3 memory-mapped external device and on-chip peripheral module any * 2 b/c * 3 8/16/32 * 4 0?3 on-chip memory and on-chip memory any * 1 b/c 8/16/32 0?3 on-chip memory and on-chip peripheral module any * 2 b/c * 3 8/16/32 * 4 0?3 dual on-chip peripheral module and on- chip peripheral module any * 2 b/c * 3 8/16/32 * 4 0?3 b: burst, c: cycle-steal notes: 1. auto-request or on-chip peripheral module request enabled. however, in the case of an on-chip peripheral module request, it is not possible to specify the sci, hcan0, or a/d converter for the transfer request source. 2. auto-request or on-chip peripheral module request possible. however, if the transfer request source is also the sci, hcan0, or a/d converter, the transfer source or transfer destination must be same as the transfer source. 3. when the transfer request source is the sci, only cycle-steal mode is possible. 4. access size permitted by the on-chip peripheral module register that is the transfer source or transfer destination.
rev. 3.0, 09/04, page 191 of 1086 10.3.8 bus mode and channel priorities if, for example, a transfer request is issued for channel 0 while transfer is in progress on lower- priority channel 1 in burst mode, transfer is started immediately on channel 0. in this case, if channel 0 is set to burst mode, channel 1 transfer is continued after completion of all transfers on channel 0. if channel 0 is set to cycle-steal mode, channel 1 transfer is continued only if a channel 0 transfer request has not been issued; if a transfer request is issued, channel 0 transfer is started immediately. 10.3.9 source address reload function channel 2 has a source address reload function. this returns to the first value set in the source address register (sar2) every four transfers by setting the ro bit of chcr2 to 1. figure 10.10 illustrates this operation. figure 10.11 is a timing chart for use of channel 2 only with the following transfer conditions set: burst mode, auto-request, 16-bit transfer data size, sar2 incremented, dar2 fixed, reload function on. sar2 (initial value) dmac transfer request dmac control block reload control 4th count chcr2 dmatcr2 sar2 ro bit = 1 count signal reload signal reload signal address bus figure 10.10 source address reload function
rev. 3.0, 09/04, page 192 of 1086 ck internal address bus internal data bus sar2 dar2 dar2 dar2 dar2 sar2+2 sar2+4 sar2+6 sar2 dar2 sar2 data sar2+2 data sar2+4 data sar2+6 data sar2 data 1st channel 2 transfer 2nd channel 2 transfer 3rd channel 2 transfer 4th channel 2 transfer 5th channel 2 transfer sar2 output dar2 output sar2+2 output dar2 output sar2+4 output dar2 output sar2+6 output dar2 output sar2 output dar2 output after sar2+6 output, sar2 is reloaded bus right is returned one time in four figure 10.11 source address reload function timing chart the reload function can be executed whether the transfer data size is 8, 16, or 32 bits. dmatcr2, which specifies the number of transfers, is decremented by 1 at the end of every single-transfer-unit transfer, regardless of whether the reload function is on or off. therefore, when using the reload function in the on state, a multiple of 4 must be specified in dmatcr2. operation will not be guaranteed if any other value is set. also, the counter which counts the occurrence of four transfers for address reloading is reset by clearing of the dme bit in dmaor or the de bit in chcr2, setting of the transfer end flag (the te bit in chcr2), nmi input, and setting of the ae flag (address error generation in dmac transfer), as well as by a reset and in software standby mode, but sar2, dar2, dmatcr2, and other registers are not reset. consequently, when one of these sources occurs, there is a mixture of initialized counters and uninitialized registers in the dmac, and incorrect operation may result if a restart is executed in this state. therefore, when one of the above sources, other than te setting, occurs during use of the address reload function, sar, dar2, and dmatcr2 settings must be carried out before re- execution. 10.3.10 dma transfer ending conditions the dma transfer ending conditions vary for individual channels ending and for all channels ending together. individual channel ending conditions: there are two ending conditions. a transfer ends when the value of the channel ? s dma transfer count register (dmatcr) is 0, or when the de bit of the channel ? s chcr is cleared to 0.
rev. 3.0, 09/04, page 193 of 1086 ? when dmatcr is 0: when the dmatcr value becomes 0 and the corresponding channel's dma transfer ends, the transfer end flag bit (te) is set in chcr. if the ie (interrupt enable) bit has been set, a dmac interrupt (dei) request is sent to the cpu. ? when de of chcr is 0: software can halt a dma transfer by clearing the de bit in the channel ? s chcr. the te bit is not set when this happens. conditions for ending on all channels simultaneously: transfers on all channels end when the nmif (nmi flag) bit or ae (address error flag) bit is set to 1 in dmaor, or when the dme bit in dmaor is cleared to 0. ? when the nmif or ae bit is set to 1 in dmaor: when an nmi interrupt or dmac address error occurs, the nmif or ae bit is set to 1 in dmaor and all channels stop their transfers. the dmac obtains the bus right, and if these flags are set to 1 during execution of a transfer, dmac halts operation when the transfer processing currently being executed ends, and transfers the bus right to the other bus master. consequently, even if the nmif or ae bit is set to 1 during a transfer, the dma source address register (sar), designation address register (dar), and transfer count register (dmatcr) are all updated. the te bit is not set. to resume the transfers after nmi interrupt or address error processing, the nmif or ae flag must be cleared. to avoid restarting a transfer on a particular channel, clear its de bit to 0 in chcr. when the processing of a one-unit transfer is complete: in a dual address mode direct address transfer, even if an address error occurs or the nmi flag is set during read processing, the transfer will not be halted until after completion of the following write processing. in such a case, sar, dar, and dmatcr values are updated. in the same manner, the transfer is not halted in indirect address transfers until after the final write processing has ended. ? when dme is cleared to 0 in dmaor: clearing the dme bit to 0 in dmaor aborts the transfers on all channels. the te bit is not set. 10.3.11 dmac access from cpu the space addressed by the dmac is 4-cycle space. therefore, when the cpu becomes the bus master and accesses the dmac, a minimum of four internal clock cycles ( ) are required for one bus cycle. also, since the dmac is located in word space, while a word-size access to the dmac is completed in one bus cycle, a longword-size access is automatically divided into two word accesses, requiring two bus cycles (eight basic clock cycles). these two bus cycles are executed consecutively; a different bus cycle is never inserted between the two word accesses. this applies to both write accesses and read accesses.
rev. 3.0, 09/04, page 194 of 1086 10.4 examples of use 10.4.1 example of dma transfer between on-chip sci and external memory in this example, on-chip serial communication interface channel 0 (sci0) receive data is transferred to external memory using dmac channel 0. table 10.5 indicates the transfer conditions and the set values of each of the registers. table 10.5 transfer conditions and register set values for transfer between on-chip sci and external memory transfer conditions register value transfer source: rdr0 of on-chip sci0 sar0 h'fffff005 transfer destination: external memory dar0 h'00400000 transfer count: 64 times dmatcr0 h'00000040 transfer source address: fixed transfer destination address: incremented transfer request source: sci0 (rdr0) bus mode: cycle-steal transfer unit: byte interrupt request generation at end of transfer chcr0 h'00020105 dmac master enable on dmaor h'0001 10.4.2 example of dma transfer between a/d converter and on-chip memory (address reload on) in this example, on-chip a/d converter channel 0 is the transfer source and on-chip memory is the transfer destination, and the address reload function is on. table 10.6 indicates the transfer conditions and the set values of each of the registers.
rev. 3.0, 09/04, page 195 of 1086 table 10.6 transfer conditions and register set values for transfer between a/d converter and on-chip memory transfer conditions register value transfer source: on-chip a/d converter ch1 (a/d1) sar2 h'fffff820 transfer destination: on-chip memory dar2 h'ffff6000 transfer count: 128 times (reload count 32 times) dmatcr2 h'00000080 transfer source address: incremented transfer destination address: incremented transfer request source: a/d converter ch1 (a/d1) bus mode: burst transfer unit: byte interrupt request generation at end of transfer chcr2 h'010c110d dmac master enable on dmaor h'0001 when address reload is on, the sar2 value returns to its initially set value every four transfers. in the above example, when a transfer request is input from the a/d1, the byte-size data is first read in from the h'fffff820 register of on-chip a/d1 and that data is written to internal address h'ffff6000. because a byte-size transfer was performed, the sar2 and dar2 values at this point are h'fffff821 and h'ffff6001, respectively. also, because this is a burst transfer, the bus right remains secured, so continuous data transfer is possible. when four transfers are completed, if address reload is off, execution continues with the fifth and sixth transfers and the sar2 value continues to increment from h'fffff824 to h'fffff825 to h'fffff826 and so on. however, when address reload is on, dmac transfer is halted upon completion of the fourth transfer and the bus right request signal to the cpu is cleared. at this time, the value stored in sar2 is not h'fffff823 h'fffff824, but h'fffff823 h'fffff820, a return to the initially set address. the dar2 value always continues to be decremented regardless of whether address reload is on or off. the dmac internal status, due to the above operation after completion of the fourth transfer, is indicated in table 10.7 for both address reload on and off.
rev. 3.0, 09/04, page 196 of 1086 table 10.7 dmac internal status item address reload on address reload off sar2 h'fffff820 h'fffff824 dar2 h'ffff6004 h'ffff6004 dmatcr2 h'0000007c h'0000007c bus right released retained dmac operation halted processing continues interrupts not issued not issued transfer request source flag clear executed not executed notes: 1. interrupts are executed until the dmatcr2 value becomes 0, and if the ie bit of chcr2 is set to 1, are issued regardless of whether address reload is on or off. 2. if transfer request source flag clears are executed until the dmatcr2 value becomes 0, they are executed regardless of whether address reload is on or off. 3. designate burst mode when using the address reload function. there are cases where abnormal operation will result if it is used in cycle-steal mode. 4. designate a multiple of four for the dmatcr2 value when using the address reload function. there are cases where abnormal operation will result if anything else is designated. to execute transfers after the fifth transfer when address reload is on, have the transfer request source issue another transfer request signal. 10.4.3 example of dma transfer between external memory and sci1 transmitting side (indirect address on) in this example, dmac channel 3 is used, indirect address designated external memory is the transfer source, and the sci1 transmitting side is the transfer destination. table 10.8 indicates the transfer conditions and the set values of each of the registers.
rev. 3.0, 09/04, page 197 of 1086 table 10.8 transfer conditions and register set values for transfer between external memory and sci1 transmitting side transfer conditions register value transfer source: external memory sar3 h'00400000 value stored in address h'00400000 ? h'00450000 value stored in address h'00450000 ? h'55 transfer destination: on-chip sci tdr1 dar3 h'fffff00b transfer count: 10 times dmatcr3 h'0000000a transfer source address: incremented transfer destination address: fixed transfer request source: sci1 (tdr1) bus mode: cycle-steal transfer unit: byte interrupt request not generated at end of transfer chcr3 h'10031001 dmac master enable on dmaor h'0001 when indirect address mode is on, the data stored in the address set in sar is not used as the transfer source data. in the case of indirect addressing, the value stored in the sar address is read, then that value is used as the address and the data read from that address is used as the transfer source data, then that data is stored in the address designated by dar. in the table 10.8 example, when a transfer request from tdr1 of sci1 is generated, a read of the address located at h'00400000, which is the value set in sar3, is performed first. the data h'00450000 is stored at this h'00400000 address, and the dmac first reads this h'00450000 value. it then uses this read value of h'00450000 as an address and reads the value of h'55 that is stored in the h'00450000 address. it then writes the value h'55 to address h'fffff00b designated by dar3 to complete one indirect address transfer. with indirect addressing, the first executed data read from the address set in sar3 always results in a longword size transfer regardless of the ts0 and ts1 bit designations for transfer data size. however, the transfer source address fixed and increment or decrement designations are according to the sm0 and sm1 bits. consequently, despite the fact that the transfer data size designation is byte in this example, the sar3 value at the end of one transfer is h'00400004. the write operation is exactly the same as an ordinary dual address transfer write operation.
rev. 3.0, 09/04, page 198 of 1086 10.5 usage notes 1. only word (16-bit) access can be used on the dma operation register (dmaor). all other registers can be accessed in word (16-bit) or longword (32-bit) units. 2. when rewriting the rs0 ? rs4 bits of chcr0 ? chcr3, first clear the de bit to 0 (clear the de bit to 0 before modifying chcr). 3. when an nmi interrupt is input, the nmif bit of dmaor is set even when the dmac is not operating. 4. clear the dme bit of dmaor to 0 and make certain that any transfer request processing accepted by the dmac has been completed before entering standby mode. 5. do not access the dmac, bsc, or ubc on-chip peripheral modules from the dmac. 6. when activating the dmac, make the chcr settings as the final step. abnormal operation may result if any other registers are set last. 7. after the dmatcr count becomes 0 and the dma transfer ends normally, always write 0 to dmatcr, even when executing the maximum number of transfers on the same channel. abnormal operation may result if this is not done. 8. designate burst mode as the transfer mode when using the address reload function. abnormal operation may result in cycle-steal mode. 9. designate a multiple of four for the dmatcr value when using the address reload function, otherwise abnormal operation may result. 10. do not access empty dmac register addresses. operation cannot be guaranteed when empty addresses are accessed. 11. if dmac transfer is aborted by nmif or ae setting, or dme or de clearing, during dmac execution with address reload on, the sar2, dar2, and dmatcr2 settings should be made before re-executing the transfer. the dmac may not operate correctly if this is not done. 12. do not set the de bit to 1 while bits rs0 to rs4 in chcr0 to chcr3 are still set to ? no request. ?
rev. 3.0, 09/04, page 199 of 1086 section 11 advanced timer unit-ii (atu-ii) 11.1 overview the sh7058 has an on-chip advanced timer unit-ii (atu-ii) with one 32-bit timer channel and eleven 16-bit timer channels. 11.1.1 features atu-ii features are summarized below. ? capability to process up to 65 pulse inputs and outputs ? prescaler ? input clock to channels 0 and 10 scaled in 1 stage, input clock to channels 1 to 8 and 11 scaled in 2 stages ? 1/1 to 1/32 clock scaling possible in initial stage for channels 0 to 8, 10, and 11 ? 1/1, 1/2, 1/4, 1/8, 1/16, or 1/32 scaling possible in second stage for channels 1 to 8 and 11 ? external clock tclka, tclkb selection also possible for channels 1 to 5 and 11 ? ti10, ti10 multiplication (compensation) selection possible for channels 1 to 5: agck, agckm ? channel 0 has four 32-bit input capture lines, allowing the following operations: ? rising-edge, falling-edge, or both-edge detection selectable ? dmac can be activated at capture timing ? channel 10 compare-match signal can be captured as a trigger ? interval interrupt generation function generates three interval interrupts as selected. cpu interruption or a/d converter (ad0, 1, 2) activation possible ? capture interrupt and counter overflow interrupt can be generated ? channel 1 has one 16-bit output compare register, eight general registers, and one dedicated input capture register. the output compare register can also be selected for one-shot pulse offset in combination with the channel 8 down-counter. ? general registers (gr1a?h) can be used as input capture or output compare registers ? waveform output by means of compare-match: selection of 0 output, 1 output, or toggle output ? input capture function: rising-edge, falling-edge, or both-edge detection ? channel 0 input signal (ti0a) can be captured as trigger ? provision for forcible cutoff of channel 8 down-counters (dcnt8a?h) ? compare-match interrupts/capture interrupts and counter overflow interrupts can be generated
rev. 3.0, 09/04, page 200 of 1086 ? channel 2 has eight 16-bit output compare registers, eight general registers, and one dedicated input capture register. the output compare registers can also be selected for one-shot pulse offset in combination with the channel 8 down-counter. ? general registers (gr2a?h) can be used as input capture or output compare registers ? waveform output by means of compare-match: selection of 0 output, 1 output, or toggle output ? input capture function: rising-edge, falling-edge, or both-edge detection ? channel 0 input signal (ti0a) can be captured as trigger ? provision for forcible cutoff of channel 8 down-counters (dcnt8i?p) ? compare-match interrupts/capture interrupts and counter overflow interrupts can be generated ? channels 3 to 5 each have four general registers, allowing the following operations: ? selection of input capture, output compare, pwm mode ? waveform output by means of compare-match: selection of 0 output, 1 output, or toggle output ? input capture function: rising-edge, falling-edge, or both-edge detection ? channel 9 compare-match signal can be captured as trigger (channel 3 only) ? compare-match interrupts/capture interrupts can be generated ? channels 6 and 7 have four 16-bit duty registers, four cycle registers, and four buffer registers, allowing the following operations: ? any cycle and duty from 0 to 100% can be set ? duty buffer register value transferred to duty register every cycle ? interrupts can be generated every cycle ? complementary pwm output can be set (channel 6 only) ? channel 8 has sixteen 16-bit down-counters for one-shot pulse output, allowing the following operations: ? one-shot pulse generation by down-counter ? down-counter can be rewritten during count ? interrupt can be generated at end of down-count ? offset one-shot pulse function available ? can be linked to channel 1 and 2 output compare functions ? reload function can be set to eight 16-bit down-counters (dcnt8i to dcnt8p) ? channel 9 has six event counters and six general registers, allowing the following operations: ? event counters can be cleared by compare-match ? rising-edge, falling-edge, or both-edge detection available for external input ? compare-match signal can be input to channel 3 ? channel 10 has a 32-bit output compare and input capture register, free-running counter, 16-bit free-running counter, output compare/input capture register, reload register, 8-bit event
rev. 3.0, 09/04, page 201 of 1086 counter, and output compare register, and 16-bit reload counter, allowing the following operations: ? capture on external input pin edge input ? reload count possible with 1/32, 1/64, 1/128, or 1/256 times the captured value ? internal clock generated by reload counter underflow can be used as 16-bit free-running counter input ? channel 1 and 2 free-running counter clearing capability ? channel 11 has one 16-bit free-running counter and two 16-bit general registers, allowing the following operations: ? two general registers can be used for input capture/output compare ? waveform output at compare-match: selection of 0, 1, or toggle output ? input capture function: selection of rising edge, falling edge, or both edge detection ? compare-match signal can be output to apc by using a general register as an output compare register ? high-speed access to internal 16-bit bus ? high-speed access to 16-bit bus for 16-bit registers: timer counters, compare registers, and capture registers ? 75 interrupt sources ? four input capture interrupt requests, one overflow interrupt request, and one interval interrupt request for channel 0 ? sixteen dual input capture/compare-match interrupt requests and two counter overflow interrupt requests for channels 1 and 2 ? twelve dual input capture/compare-match interrupt requests and three overflow interrupt requests for channels 3 to 5 ? eight compare-match interrupts for channels 6 and 7 ? sixteen one-shot end interrupt requests for channel 8 ? six compare-match interrupts for channel 9 ? two compare-match interrupts and one dual-function input capture/compare-match interrupt for channel 10 ? two dual input capture/compare-match interrupt requests and one overflow interrupt request for channel 11 ? direct memory access controller (dmac) activation ? the dmac can be activated by a channel 0 input capture interrupt (ici0a?d) ? the dmac can be activated by a channel 6 cycle register 6 compare-match interrupt (cmi6a?d) ? the dmac can be activated by a channel 7 cycle register 7 compare-match interrupt (cmi7a?d) ? a/d converter activation
rev. 3.0, 09/04, page 202 of 1086 ? the a/d converter can be activated by detection of 1 in bits itva6?13 of the channel 0 interval interrupt request registers (itvrr1, itvrr2a, itvrr2b) table 11.1 lists the functions of the atu-ii. table 11.1 atu-ii functions item channel 0 channel 1 channel 2 channels 3?5 clock sources ? /32 ( ? /32) (1/2 n ) (n = 0?5) tclka, tclkb, agck, agckm ( ? /32) (1/2 n ) (n = 0?5) tclka, tclkb, agck, agckm ( ? /32) (1/2 n ) (n = 0?5) tclka, tclkb, agck, agckm counters tcnt0h, tcnt0l tcnt1a, tcnt1b tcnt2a, tcnt2b tcnt3?5 general registers ? gr1a?h gr2a?h gr3a?d, gr4a?d, gr5a?d dedicated input capture icr0ah, icr0al, icr0bh, icr0bl, icr0ch, icr0cl, icr0dh, icr0dl osbr1 osbr2 ? dedicated output compare ? ocr1 ocr2a?2h ? counter configu- ration pwm output ? ? ? duty: gr3a?c, gr4a?c, gr5a?c cycle: gr3d, gr4d, gr5d input pins ti0a?d ? ? ? i/o pins ? tio1a?h tio2a?h tio3a?d, tio4a?d, tio5a?d output pins ? ? ? ? counter clearing function ? ? ? o interrupt sources 6 sources interval 1, input capture 4, overflow 1 9 sources dual input capture/ compare-match 8, overflow 1 9 sources dual input capture/ compare-match 8, overflow 1 * ( * same vector) 15 sources dual input capture/ compare-match 12, overflow 3 inter-channel and inter-module connection signals a/d converter activation by interval interrupt request, dmac activation by input capture interrupt, channel 10 compare-match signal capture trigger input compare-match signal trigger output to channel 8 one-shot pulse output down-counter channel 10 compare- match signal counter clear input compare-match signal trigger output to channel 8 one-shot pulse output down-counter channel 10 compare- match signal counter clear input channel 9 compare- match signal input to capture trigger (channel 3 only)
rev. 3.0, 09/04, page 203 of 1086 table 11.1 atu-ii functions (cont) item channels 6, 7 channel 8 channel 9 channel 10 channel 11 clock sources ( ? /32) (1/2 n ) (n = 0?5) ( ? /32) (1/2 n ) (n = 0?5) ? ( ? /32) ( ? /32) (1/2 n ) (n = 0-5) tclka, tclkb counters tcnt6a?d, tcnt7a?d dcnt8a?p ecnt9a?f tcnt10ah, tcnt10al, tcnt10b?h tcnt11 general registers ? ? ? ? gr11a, gr11b dedicated input capture ? ? ? icr10ah, icr10al ? dedicated output compare ? ? gr9a?f gr10g, ocr/0ah, ocr/0al, ocr/0b, ncr10, tcclr10 ? counter configu- ration pwm output cylr6a?d, cylr7a?d, dtr6a?d, dtr7a?d, bfr6a?d, bfr7a?d ? ? ? ? input pins ? ? ti9a?f ti10 ? i/o pins ? ? ? ? tio11a, tio11b output pins to6a?d, to7a?d to8a?p ? ? ? counter clearing function o ? o o ? interrupt sources 8 sources compare-match 8 16 sources underflow 16 6 sources compare-match 6 3 sources compare-match 2, dual input capture/compare -match 1 3 sources dual input capture/compare - match 2, overflow 1 inter-channel and inter-module connection signals dmac activation compare-match signal output channel 1 and 2 compare-match signal trigger input to one-shot pulse output down-counter compare-match signal channel 3 capture trigger output compare-match signal channel 0 capture trigger output channel 1 and 2 counter clear output compare-match signal output to apc o: available ?: not available
rev. 3.0, 09/04, page 204 of 1086 11.1.2 pin configuration table 11.2 shows the pin configuration of the atu-ii. when these external pin functions are used, the pin function controller (pfc) should also be set in accordance with the atu-ii settings. if there are a number of pins with the same function, make settings so that only one of the pins is used. for details, see section 21, pin function controller (pec). table 11.2 atu-ii pins channel name abbreviation i/o function clock input a tclka input external clock a input pin common clock input b tclkb input external clock b input pin input capture 0a ti0a input icr0ah, icr0al input capture input pin input capture 0b ti0b input icr0bh, icr0bl input capture input pin input capture 0c ti0c input icr0ch, icr0cl input capture input pin 0 input capture 0d ti0d input icr0dh, icr0dl input capture input pin input capture/output compare 1a tio1a input/ output gr1a output compare output/input capture input input capture/output compare 1b tio1b input/ output gr1b output compare output/input capture input input capture/output compare 1c tio1c input/ output gr1c output compare output/input capture input input capture/output compare 1d tio1d input/ output gr1d output compare output/input capture input input capture/output compare 1e tio1e input/ output gr1e output compare output/input capture input input capture/output compare 1f tio1f input/ output gr1f output compare output/input capture input input capture/output compare 1g tio1g input/ output gr1g output compare output/input capture input 1 input capture/output compare 1h tio1h input/ output gr1h output compare output/input capture input
rev. 3.0, 09/04, page 205 of 1086 table 11.2 atu-ii pins (cont) channel name abbreviation i/o function input capture/output compare 2a tio2a input/ output gr2a output compare output/input capture input input capture/output compare 2b tio2b input/ output gr2b output compare output/input capture input input capture/output compare 2c tio2c input/ output gr2c output compare output/input capture input input capture/output compare 2d tio2d input/ output gr2d output compare output/input capture input input capture/output compare 2e tio2e input/ output gr2e output compare output/input capture input input capture/output compare 2f tio2f input/ output gr2f output compare output/input capture input input capture/output compare 2g tio2g input/ output gr2g output compare output/input capture input 2 input capture/output compare 2h tio2h input/ output gr2h output compare output/input capture input input capture/output compare 3a tio3a input/ output gr3a output compare output/input capture input/pwm output pin (pwm mode) input capture/output compare 3b tio3b input/ output gr3b output compare output/input capture input/pwm output pin (pwm mode) input capture/output compare 3c tio3c input/ output gr3c output compare output/input capture input/pwm output pin (pwm mode) 3 input capture/output compare 3d tio3d input/ output gr3d output compare output/input capture input input capture/output compare 4a tio4a input/ output gr4a output compare output/input capture input/pwm output pin (pwm mode) input capture/output compare 4b tio4b input/ output gr4b output compare output/input capture input/pwm output pin (pwm mode) input capture/output compare 4c tio4c input/ output gr4c output compare output/input capture input/pwm output pin (pwm mode) 4 input capture/output compare 4d tio4d input/ output gr4d output compare output/input capture input
rev. 3.0, 09/04, page 206 of 1086 table 11.2 atu-ii pins (cont) channel name abbreviation i/o function input capture/output compare 5a tio5a input/ output gr5a output compare output/input capture input/pwm output pin (pwm mode) input capture/output compare 5b tio5b input/ output gr5b output compare output/input capture input/pwm output pin (pwm mode) input capture/output compare 5c tio5c input/ output gr5c output compare output/input capture input/pwm output pin (pwm mode) 5 input capture/output compare 5d tio5d input/ output gr5d output compare output/input capture input output compare 6a to6a output pwm output pin output compare 6b to6b output pwm output pin output compare 6c to6c output pwm output pin 6 output compare 6d to6d output pwm output pin output compare 7a to7a output pwm output pin output compare 7b to7b output pwm output pin output compare 7c to7c output pwm output pin 7 output compare 7d to7d output pwm output pin one-shot pulse 8a to8a output one-shot pulse output pin one-shot pulse 8b to8b output one-shot pulse output pin one-shot pulse 8c to8c output one-shot pulse output pin one-shot pulse 8d to8d output one-shot pulse output pin one-shot pulse 8e to8e output one-shot pulse output pin one-shot pulse 8f to8f output one-shot pulse output pin one-shot pulse 8g to8g output one-shot pulse output pin one-shot pulse 8h to8h output one-shot pulse output pin one-shot pulse 8i to8i output one-shot pulse output pin one-shot pulse 8j to8j output one-shot pulse output pin one-shot pulse 8k to8k output one-shot pulse output pin one-shot pulse 8l to8l output one-shot pulse output pin one-shot pulse 8m to8m output one-shot pulse output pin 8 one-shot pulse 8n to8n output one-shot pulse output pin
rev. 3.0, 09/04, page 207 of 1086 table 11.2 atu-ii pins (cont) channel name abbreviation i/o function one-shot pulse 8o to8o output one-shot pulse output pin 8 one-shot pulse 8p to8p output one-shot pulse output pin event input 9a ti9a input gr9a event input event input 9b ti9b input gr9b event input event input 9c ti9c input gr9c event input event input 9d ti9d input gr9d event input event input 9e ti9e input gr9e event input 9 event input 9f ti9f input gr9f event input 10 input capture ti10 input icr10ah, icr10al input capture input input capture/output compare 11a tio11a input/ output gr11a output compare output/input capture input 11 input capture/output compare 11b tio11b input/ output gr11b output compare output/input capture input
rev. 3.0, 09/04, page 208 of 1086 11.1.3 register configuration table 11.3 summarizes the atu-ii registers. table 11.3 atu-ii registers channel name abbrevia- tion r/w initial value address access size (bits) section no. timer start register 1 tstr1 r/w h'00 h'fffff401 timer start register 2 tstr2 r/w h'00 h'fffff400 timer start register 3 tstr3 r/w h'00 h'fffff402 8, 16, 32 11.2.1 prescaler register 1 pscr1 r/w h'00 h'fffff404 prescaler register 2 pscr2 r/w h'00 h'fffff406 prescaler register 3 pscr3 r/w h'00 h'fffff408 common prescaler register 4 pscr4 r/w h'00 h'fffff40a 8 11.2.2 free-running counter 0h tcnt0h r/w h'0000 free-running counter 0l tcnt0l r/w h'0000 h'fffff430 11.2.15 input capture register 0ah icr0ah r h'0000 input capture register 0al icr0al r h'0000 h'fffff434 input capture register 0bh icr0bh r h'0000 input capture register 0bl icr0bl r h'0000 h'fffff438 input capture register 0ch icr0ch r h'0000 input capture register 0cl icr0cl r h'0000 h'fffff43c input capture register 0dh icr0dh r h'0000 input capture register 0dl icr0dl r h'0000 h'fffff420 32 11.2.19 timer interval interrupt request register 1 itvrr1 r/w h'00 h'fffff424 0 timer interval interrupt request register 2a itvrr2a r/w h'00 h'fffff426 8 11.2.7
rev. 3.0, 09/04, page 209 of 1086 table 11.3 atu-ii registers (cont) channel name abbrevia- tion r/w initial value address access size (bits) section no. timer interval interrupt request register 2b itvrr2b r/w h'00 h'fffff428 11.2.7 timer i/o control register tior0 r/w h'00 h'fffff42a 8 11.2.4 timer status register 0 tsr0 r/(w) * h'0000 h'fffff42c 11.2.5 0 timer interrupt enable register 0 tier0 r/w h'0000 h'fffff42e 16 11.2.6 free-running counter 1a tcnt1a r/w h'0000 h'fffff440 free-running counter 1b tcnt1b r/w h'0000 h'fffff442 11.2.15 general register 1a gr1a r/w h'ffff h'fffff444 general register 1b gr1b r/w h'ffff h'fffff446 general register 1c gr1c r/w h'ffff h'fffff448 general register 1d gr1d r/w h'ffff h'fffff44a general register 1e gr1e r/w h'ffff h'fffff44c general register 1f gr1f r/w h'ffff h'fffff44e general register 1g gr1g r/w h'ffff h'fffff450 general register 1h gr1h r/w h'ffff h'fffff452 11.2.20 output compare register 1 ocr1 r/w h'ffff h'fffff454 11.2.18 offset base register 1 osbr1 r h'0000 h'fffff456 16 11.2.21 timer i/o control register 1a tior1a r/w h'00 h'fffff459 timer i/o control register 1b tior1b r/w h'00 h'fffff458 timer i/o control register 1c tior1c r/w h'00 h'fffff45b timer i/o control register 1d tior1d r/w h'00 h'fffff45a 11.2.4 timer control register 1a tcr1a r/w h'00 h'fffff45d 1 timer control register 1b tcr1b r/w h'00 h'fffff45c 8, 16 11.2.3
rev. 3.0, 09/04, page 210 of 1086 table 11.3 atu-ii registers (cont) channel name abbrevia- tion r/w initial value address access size (bits) section no. timer status register 1a tsr1a r/(w) * h'0000 h'fffff45e timer status register 1b tsr1b r/(w) * h'0000 h'fffff460 11.2.5 timer interrupt enable register 1a tier1a r/w h'0000 h'fffff462 timer interrupt enable register 1b tier1b r/w h'0000 h'fffff464 16 11.2.6 1 trigger mode register trgmdr r/w h'00 h'fffff466 8 11.2.8 free-running counter 2a tcnt2a r/w h'0000 h'fffff600 free-running counter 2b tcnt2b r/w h'0000 h'fffff602 11.2.15 general register 2a gr2a r/w h'ffff h'fffff604 general register 2b gr2b r/w h'ffff h'fffff606 general register 2c gr2c r/w h'ffff h'fffff608 general register 2d gr2d r/w h'ffff h'fffff60a general register 2e gr2e r/w h'ffff h'fffff60c general register 2f gr2f r/w h'ffff h'fffff60e general register 2g gr2g r/w h'ffff h'fffff610 general register 2h gr2h r/w h'ffff h'fffff612 11.2.20 output compare register 2a ocr2a r/w h'ffff h'fffff614 output compare register 2b ocr2b r/w h'ffff h'fffff616 output compare register 2c ocr2c r/w h'ffff h'fffff618 output compare register 2d ocr2d r/w h'ffff h'fffff61a output compare register 2e ocr2e r/w h'ffff h'fffff61c 2 output compare register 2f ocr2f r/w h'ffff h'fffff61e 16 11.2.18
rev. 3.0, 09/04, page 211 of 1086 table 11.3 atu-ii registers (cont) channel name abbrevia- tion r/w initial value address access size (bits) section no. output compare register 2g ocr2g r/w h'ffff h'fffff620 output compare register 2h ocr2h r/w h'ffff h'fffff622 11.2.18 offset base register 2 osbr2 r h'0000 h'fffff624 16 11.2.21 timer i/o control register 2a tior2a r/w h'00 h'fffff627 timer i/o control register 2b tior2b r/w h'00 h'fffff626 timer i/o control register 2c tior2c r/w h'00 h'fffff629 timer i/o control register 2d tior2d r/w h'00 h'fffff628 11.2.4 timer control register 2a tcr2a r/w h'00 h'fffff62b timer control register 2b tcr2b r/w h'00 h'fffff62a 8, 16 11.2.3 timer status register 2a tsr2a r/(w) * h'0000 h'fffff62c timer status register 2b tsr2b r/(w) * h'0000 h'fffff62e 11.2.5 timer interrupt enable register 2a tier2a r/w h'0000 h'fffff630 2 timer interrupt enable register 2b tier2b r/w h'0000 h'fffff632 16 11.2.6 timer status register 3 tsr3 r/(w) * h'0000 h'fffff480 11.2.5 timer interrupt enable register 3 tier3 r/w h'0000 h'fffff482 16 11.2.6 3?5 timer mode register tmdr r/w h'00 h'fffff484 8 11.2.9 free-running counter 3 tcnt3 r/w h'0000 h'fffff4a0 11.2.15 general register 3a gr3a r/w h'ffff h'fffff4a2 general register 3b gr3b r/w h'ffff h'fffff4a4 general register 3c gr3c r/w h'ffff h'fffff4a6 3 general register 3d gr3d r/w h'ffff h'fffff4a8 16 11.2.20
rev. 3.0, 09/04, page 212 of 1086 table 11.3 atu-ii registers (cont) channel name abbrevia- tion r/w initial value address access size (bits) section no. timer i/o control register 3a tior3a r/w h'00 h'fffff4ab timer i/o control register 3b tior3b r/w h'00 h'fffff4aa 8, 16 11.2.4 3 timer control register 3 tcr3 r/w h'00 h'fffff4ac 8 11.2.3 free-running counter 4 tcnt4 r/w h'0000 h'fffff4c0 11.2.15 general register 4a gr4a r/w h'ffff h'fffff4c2 general register 4b gr4b r/w h'ffff h'fffff4c4 general register 4c gr4c r/w h'ffff h'fffff4c6 general register 4d gr4d r/w h'ffff h'fffff4c8 16 11.2.20 timer i/o control register 4a tior4a r/w h'00 h'fffff4cb timer i/o control register 4b tior4b r/w h'00 h'fffff4ca 8, 16 11.2.4 4 timer control register 4 tcr4 r/w h'00 h'fffff4cc 8 11.2.3 free-running counter 5 tcnt5 r/w h'0000 h'fffff4e0 11.2.15 general register 5a gr5a r/w h'ffff h'fffff4e2 general register 5b gr5b r/w h'ffff h'fffff4e4 general register 5c gr5c r/w h'ffff h'fffff4e6 general register 5d gr5d r/w h'ffff h'fffff4e8 16 11.2.20 timer i/o control register 5a tior5a r/w h'00 h'fffff4eb timer i/o control register 5b tior5b r/w h'00 h'fffff4ea 8, 16 11.2.4 5 timer control register 5 tcr5 r/w h'00 h'fffff4ec 8 11.2.3 free-running counter 6a tcnt6a r/w h'0001 h'fffff500 free-running counter 6b tcnt6b r/w h'0001 h'fffff502 free-running counter 6c tcnt6c r/w h'0001 h'fffff504 6 free-running counter 6d tcnt6d r/w h'0001 h'fffff506 16 11.2.15
rev. 3.0, 09/04, page 213 of 1086 table 11.3 atu-ii registers (cont) channel name abbrevia- tion r/w initial value address access size (bits) section no. cycle register 6a cylr6a r/w h'ffff h'fffff508 cycle register 6b cylr6b r/w h'ffff h'fffff50a cycle register 6c cylr6c r/w h'ffff h'fffff50c cycle register 6d cylr6d r/w h'ffff h'fffff50e 11.2.22 buffer register 6a bfr6a r/w h'ffff h'fffff510 buffer register 6b bfr6b r/w h'ffff h'fffff512 buffer register 6c bfr6c r/w h'ffff h'fffff514 buffer register 6d bfr6d r/w h'ffff h'fffff516 11.2.23 duty register 6a dtr6a r/w h'ffff h'fffff518 duty register 6b dtr6b r/w h'ffff h'fffff51a duty register 6c dtr6c r/w h'ffff h'fffff51c duty register 6d dtr6d r/w h'ffff h'fffff51e 16 11.2.24 timer control register 6a tcr6a r/w h'00 h'fffff521 timer control register 6b tcr6b r/w h'00 h'fffff520 8, 16 11.2.3 timer status register 6 tsr6 r/(w) * h'0000 h'fffff522 11.2.5 timer interrupt enable register 6 tier6 r/w h'0000 h'fffff524 16 11.2.6 6 pwm mode register pmdr r/w h'00 h'fffff526 8 11.2.10 free-running counter 7a tcnt7a r/w h'0001 h'fffff580 free-running counter 7b tcnt7b r/w h'0001 h'fffff582 free-running counter 7c tcnt7c r/w h'0001 h'fffff584 free-running counter 7d tcnt7d r/w h'0001 h'fffff586 11.2.15 cycle register 7a cylr7a r/w h'ffff h'fffff588 cycle register 7b cylr7b r/w h'ffff h'fffff58a cycle register 7c cylr7c r/w h'ffff h'fffff58c 7 cycle register 7d cylr7d r/w h'ffff h'fffff58e 16 11.2.22
rev. 3.0, 09/04, page 214 of 1086 table 11.3 atu-ii registers (cont) channel name abbrevia- tion r/w initial value address access size (bits) section no. buffer register 7a bfr7a r/w h'ffff h'fffff590 buffer register 7b bfr7b r/w h'ffff h'fffff592 buffer register 7c bfr7c r/w h'ffff h'fffff594 buffer register 7d bfr7d r/w h'ffff h'fffff596 11.2.23 duty register 7a dtr7a r/w h'ffff h'fffff598 duty register 7b dtr7b r/w h'ffff h'fffff59a duty register 7c dtr7c r/w h'ffff h'fffff59c duty register 7d dtr7d r/w h'ffff h'fffff59e 16 11.2.24 timer control register 7a tcr7a r/w h'00 h'fffff5a1 timer control register 7b tcr7b r/w h'00 h'fffff5a0 8, 16 11.2.3 timer status register 7 tsr7 r/(w) * h'0000 h'fffff5a2 11.2.5 7 timer interrupt enable register 7 tier7 r/w h'0000 h'fffff5a4 16 11.2.6 down-counter 8a dcnt8a r/w h'0000 h'fffff640 down-counter 8b dcnt8b r/w h'0000 h'fffff642 down-counter 8c dcnt8c r/w h'0000 h'fffff644 down-counter 8d dcnt8d r/w h'0000 h'fffff646 down-counter 8e dcnt8e r/w h'0000 h'fffff648 down-counter 8f dcnt8f r/w h'0000 h'fffff64a down-counter 8g dcnt8g r/w h'0000 h'fffff64c down-counter 8h dcnt8h r/w h'0000 h'fffff64e down-counter 8i dcnt8i r/w h'0000 h'fffff650 down-counter 8j dcnt8j r/w h'0000 h'fffff652 down-counter 8k dcnt8k r/w h'0000 h'fffff654 down-counter 8l dcnt8l r/w h'0000 h'fffff656 down-counter 8m dcnt8m r/w h'0000 h'fffff658 down-counter 8n dcnt8n r/w h'0000 h'fffff65a down-counter 8o dcnt8o r/w h'0000 h'fffff65c 8 down-counter 8p dcnt8p r/w h'0000 h'fffff65e 16 11.2.16
rev. 3.0, 09/04, page 215 of 1086 table 11.3 atu-ii registers (cont) channel name abbrevia- tion r/w initial value address access size (bits) section no. reload register 8 rldr8 r/w h'0000 h'fffff660 11.2.25 timer connection register tcnr r/w h'0000 h'fffff662 11.2.12 one-shot pulse terminate register otr r/w h'0000 h'fffff664 11.2.13 down-count start register dstr r/w h'0000 h'fffff666 16 11.2.11 timer control register 8 tcr8 r/w h'00 h'fffff668 8 11.2.3 timer status register 8 tsr8 r/(w) * h'0000 h'fffff66a 11.2.5 timer interrupt enable register 8 tier8 r/w h'0000 h'fffff66c 16 11.2.6 8 reload enable register rldenr r/w h'00 h'fffff66e 8 11.2.14 event counter 9a ecnt9a r/w h'00 h'fffff680 event counter 9b ecnt9b r/w h'00 h'fffff682 event counter 9c ecnt9c r/w h'00 h'fffff684 event counter 9d ecnt9d r/w h'00 h'fffff686 event counter 9e ecnt9e r/w h'00 h'fffff688 event counter 9f ecnt9f r/w h'00 h'fffff68a 11.2.17 general register 9a gr9a r/w h'ff h'fffff68c general register 9b gr9b r/w h'ff h'fffff68e general register 9c gr9c r/w h'ff h'fffff690 general register 9d gr9d r/w h'ff h'fffff692 general register 9e gr9e r/w h'ff h'fffff694 general register 9f gr9f r/w h'ff h'fffff696 11.2.20 timer control register 9a tcr9a r/w h'00 h'fffff698 timer control register 9b tcr9b r/w h'00 h'fffff69a timer control register 9c tcr9c r/w h'00 h'fffff69c 8 11.2.3 timer status register 9 tsr9 r/(w) * h'0000 h'fffff69e 11.2.5 9 timer interrupt enable register 9 tier9 r/w h'0000 h'fffff6a0 16 11.2.6
rev. 3.0, 09/04, page 216 of 1086 table 11.3 atu-ii registers (cont) channel name abbrevia- tion r/w initial value address access size (bits) section no. free-running counter 10ah tcnt10ah r/w h'0000 free-running counter 10al tcnt10al r/w h'0001 h'fffff6c0 32 event counter 10b tcnt10b r/w h'00 h'fffff6c4 8 reload counter 10c tcnt10c r/w h'0001 h'fffff6c6 16 correction counter 10d tcnt10d r/w h'00 h'fffff6c8 8 correction angle counter 10e tcnt10e r/w h'0000 h'fffff6ca correction angle counter 10f tcnt10f r/w h'0001 h'fffff6cc free-running counter 10g tcnt10g r/w h'0000 h'fffff6ce 16 input capture register 10ah icr10ah r h'0000 input capture register 10al icr10al r h'0000 h'fffff6d0 output compare register 10ah ocr10ah r/w h'ffff output compare register 10al ocr10al r/w h'ffff h'fffff6d4 32 output compare register 10b ocr10b r/w h'ff h'fffff6d8 8 reload register 10c rld10c r/w h'0000 h'fffff6da general register 10g gr10g r/w h'ffff h'fffff6dc 16 noise canceler counter 10h tcnt10h r/w h'00 h'fffff6de noise canceler register 10 ncr10 r/w h'ff h'fffff6e0 timer i/o control register 10 tior10 r/w h'00 h'fffff6e2 10 timer control register 10 tcr10 r/w h'00 h'fffff6e4 8 11.2.26
rev. 3.0, 09/04, page 217 of 1086 table 11.3 atu-ii registers (cont) channel name abbrevia- tion r/w initial value address access size (bits) section no. correction counter clear register 10 tcclr10 r/w h'0000 h'fffff6e6 timer status register 10 tsr10 r/(w) * h'0000 h'fffff6e8 10 timer interrupt enable register 10 tier10 r/w h'0000 h'fffff6ea 16 11.2.26 free-running counter 11 tcnt11 r/w h'0000 h'fffff5c0 11.2.15 general register 11a gr11a r/w h'ffff h'fffff5c2 general register 11b gr11b r/w h'ffff h'fffff5c4 16 11.2.20 timer i/o control register 11 tior11 r/w h'00 h'fffff5c6 11.2.4 timer control register 11 tcr11 r/w h'00 h'fffff5c8 8 11.2.3 timer status register 11 tsr11 r/(w) * h'0000 h'fffff5ca 11.2.5 11 timer interrupt enable register 11 tier11 r/w h'0000 h'fffff5cc 16 11.2.6 note: * only a 0 write after a read is enabled.
rev. 3.0, 09/04, page 218 of 1086 11.1.4 block diagrams overall block diagram of atu-ii: figure 11.1 shows an overall block diagram of the atu-ii. ic/oc control i/o interrupt control counter and register control, and comparator tclka tclkb interrupts inter-module connection signals external pins inter-module address bus prescaler clock selection module data bus inter-module data bus 32-bit timer channel 0 16-bit timer channel 1 channel 10 16-bit timer channel 11 tstr1 tstr2 tstr3 bus interface legend: tstr1, 2, 3: timer start registers (8 bits) interrupts: itv0?itv2, ovi0, ovi1a, ovi1b, ovi2a, ovi2b, ovi3?ovi5, ovi11, ici0a?ici0d, imi1a?imi1h, cmi1, imi2a?imi2h, cmi2a?cmi2h, imi3a?imi3d, imi4a?imi4d, imi5a?imi5d, cmi6a?cmi6d, cmi7a?cmi7d, osi8a?osi8p, cmi9a?cmi9f, cmi10a, cmi10b, ici10a, cmi10g, imi11a, imi11b external pins: ti0a?ti0d, tio1a?tio1h, tio2a?tio2h, tio3a?tio3d, tio4a?tio4d, tio5a?tio5d, to6a?to6d, to7a?to7d, to8a?to8p, ti9a?ti9f, ti10, tio11a?tio11b inter-module connection signals: signals to a/d converter, signals to direct memory access controller (dmac), signals to advanced pulse controller (apc) . . . . . . . . p figure 11.1 overall block diagram of atu-ii
rev. 3.0, 09/04, page 219 of 1086 block diagram of channel 0: figure 11.2 shows a block diagram of atu-ii channel 0. a/d converter trigger trgod (ocr10b compare-match signal) control logic i/o control osbr (ch1, ch2) internal data bus and address bus str0 ti0a ti0b ti0c ti0d prescaler 1 overflow interrupt signal interval interrupt tior0 tier0 itvrr1 itvrr2a itvrr2b tsr0 icr0al icr0bl icr0cl icr0dl tcnt0l icr0ah icr0bh icr0ch icr0dh tcnt0h figure 11.2 block diagram of channel 0
rev. 3.0, 09/04, page 220 of 1086 block diagram of channel 1: figure 11.3 shows a block diagram of atu-ii channel 1. control logic i/o control internal data bus and address bus tio1a tio1b tio1c tio1d tio1e tio1f tio1g tio1h str1a/1b, 2b prescaler 1 tclka tclkb ti10 (agck) ti10 multiplication (agckm) one-shot start trigger (ch8) trg1a (counter clear trigger from ch10) trg1b (counter clear trigger from ch10) one-shot terminate trigger (ch8) overflow interrupt 1 input capture/output compare interrupts 8 gr1a gr1b gr1c gr1d gr1e gr1f gr1g gr1h osbr1 tcnt1a clock selection logic (2 systems: a, b) ti0a(capture signal from ch0) compa- rator ocr1 tcnt1b tior1a tior1b tior1c tior1d tcr1a tcr1b tsr1a tsr1b tier1a tier1b trgmdr figure 11.3 block diagram of channel 1
rev. 3.0, 09/04, page 221 of 1086 block diagram of channel 2: figure 11.4 shows a block diagram of atu-ii channel 2. control logic i/o control internal data bus and address bus tio2a tio2b tio2c tio2d tio2e tio2f tio2g tio2h str2a/1b, 2b prescaler 1 tclka tclkb ti10 (agckm) ti10 multiplication (agck) one-shot start trigger (ch8) trg2a (counter clear trigger from ch10) trg2b (counter clear trigger from ch10) one-shot terminate trigger (ch8) overflow interrupt 1 input capture/output compare interrupts 8 gr2a gr2b gr2c gr2d gr2e gr2f gr2g gr2h osbr2 tcnt2a ocr2a ocr2b ocr2c ocr2d ocr2e ocr2f ocr2g ocr2h tcnt2b clock selection logic ti0a (couter clear trigger from ch0) compa- rator tior2a tior2b tior2c tior2d tcr2a tcr2b tsr2a tsr2b tier2a tier2b figure 11.4 block diagram of channel 2
rev. 3.0, 09/04, page 222 of 1086 block diagram of channels 3 to 5: figure 11.5 shows a block diagram of atu-ii channels 3, 4, and 5. control logic i/o control internal data bus and address bus tio3a tio3b tio3c tio3d tio4a tio4b tio4c tio4d tio5a tio5b tio5c tio5d str3 to 5 prescaler 1 tclka tclkb ti10 (agck) ti10 multiplication (agckm) channel 9 compare- match trigger overflow interrupts 3 input capture/output compare interrupts 12 gr3d tcnt3 tior3a tior3b tcr3 gr5d tcnt5 tior5a tior5b tcr5 tmdr tier3 tsr3 gr3a clock selection logic (3 systems: ch3, 4, 5) compa- rator gr4a gr4d tcnt4 tior4a tior4b tcr4 gr5a          figure 11.5 block diagram of channels 3 to 5
rev. 3.0, 09/04, page 223 of 1086 block diagram of channels 6 and 7: figure 11.6 shows a block diagram of atu-ii channels 6 and 7. control logic i/o control internal data bus and address bus note: channel 7 has no pmdr7. to6a to6b to6c to6d str6 , 7 prescaler 2 compare-match interrupts 4 clock selection logic (a ? d independent) compa- rator bfr6a cylr6a dtr6a tcnt6a bfr6b cylr6b dtr6b tcnt6b bfr6c cylr6c dtr6c tcnt6c bfr6d cylr6d dtr6d tcnt6d tcr6a tcr6b tsr6 tier6 pmdr figure 11.6 block diagram of channel 6 (same configuration for channel 7)
rev. 3.0, 09/04, page 224 of 1086 block diagram of channel 8: figure 11.7 shows a block diagram of atu-ii channel 8. control logic i/o control internal data bus and address bus to8a to8b to8o to8p prescaler 1 down-count end interrupts 16 (osi) compa- rator one-shot start trigger (ch1, 2) one-shot terminate trigger (ch1, 2) rldr8 tcnr otr dstr tcr8 tsr8 tier8 rldenr dcnt8m dcnt8n dcnt8o dcnt8p dcnt8a dcnt8b dcnt8c dcnt8d clock selection (2 systems: a ? h, i ? p)         figure 11.7 block diagram of channel 8
rev. 3.0, 09/04, page 225 of 1086 block diagram of channel 9: figure 11.8 shows a block diagram of atu-ii channel 9. control logic i/o control internal data bus and address bus ti9a ti9b ti9c ti9d ti9e ti9f channel 3 capture trigger 4 compare-match interrupts 6 gr9a ecnt9a gr9b ecnt9b gr9c ecnt9c gr9d ecnt9d gr9e ecnt9e gr9f ecnt9f tcr9a tcr9b tcr9c tsr9 tier9 compa- rator figure 11.8 block diagram of channel 9
rev. 3.0, 09/04, page 226 of 1086 block diagram of channel 10: figure 11.9 shows a block diagram of atu-ii channel 10. control logic i/o control internal data bus and address bus ti10 output compare interrupts 2 input capture / output compare interrupt 1 trg0d (ocr10b compare- match signal) trg1a, 1b, 2a, 2b (counter clear trigger) frequency multipli- cation clock frequency multipli- cation correction clock ocr10b tcnt10b rld10c tcnt10c tcnt10d tcnt10e tcnt10f gr10g tcnt10g ncr10 tcnt10h tcclr10 tior10 tcr10 tier10 tsr10 str10 icr10al ocr10al tcnt10al icr10ah ocr10ah tcnt10ah prescaler 4 figure 11.9 block diagram of channel 10
rev. 3.0, 09/04, page 227 of 1086 block diagram of channel 11: figure 11.10 shows a block diagram of atu-ii channel 11. control logic i/o control internal data bus and address bus tio11a tio11b str11 prescaler 4 overflow interrupt 1 input capture/output compare interrupts 2 apc output compare-match timing signals 2 tclka tclkb clock selection logic compa- rator gr11a gr11b tcnt11 tior11 tcr11 tsr11 tier11 figure 11.10 block diagram of channel 11
rev. 3.0, 09/04, page 228 of 1086 11.1.5 inter-channel and inter-module signal communication diagram figure 11.11 shows the connections between channels and between modules in the atu-ii. dcnt8a dcnt8b dcnt8c dcnt8d dcnt8e dcnt8f dcnt8g dcnt8h icr0a icr0b icr0c icr0d tcnt1a tcnt1b gr1a gr1b gr1h itvrr1 itvrr2a itvrr2b a/d converter activation dmac activation capture trigger ti10(agck) ti10 multiplication (agckm) ti10(agck) ti10 multiplication (agckm) ti10(agck) ti10 multiplication (agckm) ti10(agck) ti10 multiplication (agckm) ti10(akck) ti10 multiplication (agckm) dmac activation (compare-match) compare-match signal transmission to advanced pulse controller (apc) one-shot start one-shot terminate osbr1 ocr10b tcnt10f ocr1 tcnt2a tcnt2b gr2a gr2b gr2h ocr2a ocr2b ocr2h osbr2 channel 2 channel 8 channel 1 channel 0 channel 10 gr9a gr9b gr9c gr9d gr9e gr9f channel 9 cylr6, 7x dtr6, 7x bfr6, 7x tcnt6, 7x x: a, b, c, d channel 6, 7 gr11a gr11b tcnt11 channel 11 gr3a gr3b gr3c gr3d channel 3 channel 4 channel 5 dcnt8i dcnt8j dcnt8k dcnt8l dcnt8m dcnt8n dcnt8o dcnt8p ti0a counter clear trigger capture trigger capture trigger          figure 11.11 inter-module communication signals
rev. 3.0, 09/04, page 229 of 1086 11.1.6 prescaler diagram figure 11.12 shows a diagram of the atu-ii prescalers. prescaler 1 channel 1 channel 0 channel 2 channel 3 channel 4 channel 5 channel 8 prescaler 2 channel 6 channel 7 channel 11 channel 9 channel 10 timer control register prescaler 3 prescaler 4 input clock /2 tclka tclkb ti10 ti9a ti9b ti9c ti9d ti9e ti9f edge detection figure 11.12 prescaler diagram
rev. 3.0, 09/04, page 230 of 1086 11.2 register descriptions 11.2.1 timer start registers (tstr) the timer start registers (tstr) are 8-bit registers. the atu-ii has three tstr registers. channel abbreviation function 0, 1, 2, 3, 4, 5, 10 tstr1 6, 7 tstr2 11 tstr3 free-running counter operation/stop setting timer start register 1 (tstr1) bit: 7 6 5 4 3 2 1 0 str10 str5 str4 str3 str1b, 2b str2a str1a str0 initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w tstr1 is an 8-bit readable/writable register that starts and stops the free-running counter (tcnt) in channels 0 to 5 and 10. tstr1 is initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode. ? bit 7?counter start 10 (str10): starts and stops channel 10 counters (tcnt10a, 10c, 10d, 10e, 10f, and 10g). tcnt10b and 10h are not stopped. bit 7: str10 description 0 tcnt10 is halted (initial value) 1 tcnt10 counts ? bit 6?counter start 5 (str5): starts and stops free-running counter 5 (tcnt5). bit 6: str5 description 0 tcnt5 is halted (initial value) 1 tcnt5 counts
rev. 3.0, 09/04, page 231 of 1086 ? bit 5?counter start 4 (str4): starts and stops free-running counter 4 (tcnt4). bit 5: str4 description 0 tcnt4 is halted (initial value) 1 tcnt4 counts ? bit 4?counter start 3 (str3): starts and stops free-running counter 3 (tcnt3). bit 4: str3 description 0 tcnt3 is halted (initial value) 1 tcnt3 counts ? bit 3?counter start 1b, 2b (str1b, str2b): starts and stops free-running counters 1b and 2b (tcnt1b, tcnt2b). bit 3: str1b, str2b description 0 tcnt1b and tcnt2b are halted (initial value) 1 tcnt1b and tcnt2b count ? bit 2?counter start 2a (str2a): starts and stops free-running counter 2a (tcnt2a). bit 2: str2a description 0 tcnt2a is halted (initial value) 1 tcnt2a counts ? bit 1?counter start 1a (str1a): starts and stops free-running counter 1a (tcnt1a). bit 1: str1a description 0 tcnt1a is halted (initial value) 1 tcnt1a counts ? bit 0?counter start 0 (str0): starts and stops free-running counter 0 (tcnt0). bit 0: str0 description 0 tcnt0 is halted (initial value) 1 tcnt0 counts
rev. 3.0, 09/04, page 232 of 1086 timer start register 2 (tstr2) bit: 7 6 5 4 3 2 1 0 str7d str7c str7b str7a str6d str6c str6b str6a initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w tstr2 is an 8-bit readable/writable register that starts and stops the free-running counter (tcnt) in channels 6 and 7. tstr2 is initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode. ? bit 7?counter start 7d (str7d): starts and stops free-running counter 7d (tcnt7d). bit 7: str7d description 0 tcnt7d is halted (initial value) 1 tcnt7d counts ? bit 6?counter start 7c (str7c): starts and stops free-running counter 7c (tcnt7c). bit 6: str7c description 0 tcnt7c is halted (initial value) 1 tcnt7c counts ? bit 5?counter start 7b (str7b): starts and stops free-running counter 7b (tcnt7b). bit 5: str7b description 0 tcnt7b is halted (initial value) 1 tcnt7b counts ? bit 4?counter start 7a (str7a): starts and stops free-running counter 7a (tcnt7a). bit 4: str7a description 0 tcnt7a is halted (initial value) 1 tcnt7a counts
rev. 3.0, 09/04, page 233 of 1086 ? bit 3?counter start 6d (str6d): starts and stops free-running counter 6d (tcnt6d). bit 3: str6d description 0 tcnt6d is halted (initial value) 1 tcnt6d counts ? bit 2?counter start 6c (str6c): starts and stops free-running counter 6c (tcnt6c). bit 2: str6c description 0 tcnt6c is halted (initial value) 1 tcnt6c counts ? bit 1?counter start 6b (str6b): starts and stops free-running counter 6b (tcnt6b). bit 1: str6b description 0 tcnt6b is halted (initial value) 1 tcnt6b counts ? bit 0?counter start 6a (str6a): starts and stops free-running counter 6a (tcnt6a). bit 0: str6a description 0 tcnt6a is halted (initial value) 1 tcnt6a counts timer start register 3 (tstr3) bit: 7 6 5 4 3 2 1 0 ? ? ? ? ? ? ? str11 initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r/w tstr3 is an 8-bit readable/writable register that starts and stops the free-running counter (tcnt11) in channel 11. tstr3 is initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode. ? bits 7 to 1?reserved: these bits are always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 234 of 1086 ? bit 0?counter start 11 (str11): starts and stops free-running counter 11 (tcnt11). bit 0: str11 description 0 tcnt11 is halted (initial value) 1 tcnt11 counts 11.2.2 prescaler registers (pscr) the prescaler registers (pscr) are 8-bit registers. the atu-ii has four pscr registers. channel abbreviation function 0, 1, 2, 3, 4, 5, 8, 11 pscr1 6 pscr2 7 pscr3 10 pscr4 prescaler setting for respective channels pscrx is an 8-bit writable register that enables the first-stage counter clock ' input to each channel to be set to any value from p /1 to p /32. bit: 7 6 5 4 3 2 1 0 ? ? ? pscxe pscxd pscxc pscxb pscxa initial value: 0 0 0 0 0 0 0 0 r/w: r r r r/w r/w r/w r/w r/w x = 1 to 4 input counter clock ' is determined by setting pscxa to pscxe: ' is p /1 when the set value is h'00, and p /32 when h'1f. pscrx is initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode. the internal clock ' set with this register can undergo further second-stage scaling to create clock " for channels 1 to 8 and 11, the setting being made in the timer control register (tcr). ? bits 7 to 5?reserved: these bits cannot be modified. ? bits 4 to 0?prescaler (pscxe, pscxd, pscxc, pscxb, pscxa): these bits specify frequency division of first-stage counter clock ?' input to the corresponding channel.
rev. 3.0, 09/04, page 235 of 1086 11.2.3 timer control registers (tcr) the timer control registers (tcr) are 8-bit registers. the atu-ii has 16 tcr registers: two each for channels 1 and 2, one each for channels 3, 4, 5, 8, and 11, two each for channels 6 and 7, and three for channel 9. for details of channel 10, see section 11.2.26, channel 10 registers. channel abbreviation function 1 tcr1a, tcr1b 2 tcr2a, tcr2b 3 tcr3 4 tcr4 5 tcr5 internal clock/external clock/ti10 input clock selection 6 tcr6a, tcr6b 7 tcr7a, tcr7b 8 tcr8 internal clock selection 9 tcr9a, tcr9b, tcr9c external clock selection/setting of channel 3 trigger in event of compare-match 11 tcr11 internal clock/external clock selection each tcr is an 8-bit readable/writable register that selects whether an internal clock or external clock is used for channels 1 to 5 and 11. for channels 6 to 8, tcr selects an internal clock, and for channel 9, an external clock. when an internal clock is selected, tcr selects the value of " further scaled from clock ' scaled with prescaler register (pscr). scaled clock " can be selected, for channels 1 to 8 and 11 only, from ', '/2, '/4, '/8, '/16, and '/32 (only ' is available for channel 0). edge detection is performed on the rising edge. when an external clock is selected, tcr selects whether tclka, tclkb (channels 1 to 5 and 11 only), ti10 pin input (channels 1 to 5 only), or a ti10 pin input multiplied clock (channels 1 to 5 only) is used, and also performs edge selection. each tcr is initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode.
rev. 3.0, 09/04, page 236 of 1086 timer control registers 1a, 1b, 2a, 2b (tcr1a, tcr1b, tcr2a, tcr2b) tcr1a, tcr2a bit: 7 6 5 4 3 2 1 0 ? ? ckega1 ckega0 cksela3 cksela2 cksela1 cksela0 initial value: 0 0 0 0 0 0 0 0 r/w: r r r/w r/w r/w r/w r/w r/w tcr1b, tcr2b bit: 7 6 5 4 3 2 1 0 ? ? ckegb1 ckegb0 ckselb3 ckselb2 ckselb1 ckselb0 initial value: 0 0 0 0 0 0 0 0 r/w: r r r/w r/w r/w r/w r/w r/w ? bits 7 and 6?reserved: these bits are always read as 0. the write value should always be 0. ? bits 5 and 4?clock edge 1 and 0 (ckegx1, ckegx0): these bits select the count edge(s) for external clock tclka and tclkb input. bit 5: ckegx1 bit 4: ckegx0 description 0 rising edges counted (initial value) 0 1 falling edges counted 0 both rising and falling edges counted 1 1 count disabled x = a or b ? bits 3 to 0?clock select a3 to a0, b3 to b0 (cksela3 to cksela0, ckselb3 to ckselb0): these bits select whether an internal clock or external clock is used. when an internal clock is selected, scaled clock " is selected from ', '/2, '/4, '/8, '/16, and '/32. when an external clock is selected, tclka, tclkb, ti10 pin input, or a ti10 pin input multiplied clock is selected. when ti10 pin input and ti10 pin input clock multiplication are selected, set ckeg1 and ckeg0 in tcr10 so that ti10 input is possible.
rev. 3.0, 09/04, page 237 of 1086 bit 3: ckselx3 bit 2: ckselx2 bit 1: ckselx1 bit 0: ckselx0 description 0 internal clock ": counting on ' (initial value) 0 1 internal clock ": counting on '/2 0 internal clock ": counting on '/4 0 1 1 internal clock ": counting on '/8 0 internal clock ": counting on '/16 0 1 internal clock ": counting on '/32 0 external clock: counting on tclka pin input 0 1 1 1 external clock: counting on tclkb pin input 0 counting on ti10 pin input (agck) 0 1 counting on multiplied (corrected)(agckm) ti10 pin input clock 0 1 * setting prohibited 1 1 * * setting prohibited x = a or b * : don't care timer control registers 3 to 5 (tcr3, tcr4, tcr5) bit: 7 6 5 4 3 2 1 0 ? ? ckeg1 ckeg0 cksel3 cksel2 cksel1 cksel0 initial value: 0 0 0 0 0 0 0 0 r/w: r r r/w r/w r/w r/w r/w r/w ? bits 7 and 6?reserved: these bits are always read as 0. the write value should always be 0. ? bits 5 and 4?clock edge 1 and 0 (ckeg1, ckeg0): these bits select the count edge(s) for external clock tclka and tclkb input. bit 5: ckeg1 bit 4: ckeg0 description 0 rising edges counted (initial value) 0 1 falling edges counted 0 both rising and falling edges counted 1 1 count disabled
rev. 3.0, 09/04, page 238 of 1086 ? bits 3 to 0?clock select 3 to 0 (cksel3 to cksel0): these bits select whether an internal clock or external clock is used. when an internal clock is selected, scaled clock " is selected from ', '/2, '/4, '/8, '/16, and '/32. when an external clock is selected, tclka, tclkb, ti10 pin input, or a ti10 pin input multiplied clock is selected. when ti10 pin input and ti10 pin input clock multiplication are selected, set ckeg1 and ckeg0 in tcr10 so that ti10 input is possible. bit 3: cksel3 bit 2: cksel2 bit 1: cksel1 bit 0: cksel0 description 0 internal clock ": counting on ' (initial value) 0 1 internal clock ": counting on '/2 0 internal clock ": counting on '/4 0 1 1 internal clock ": counting on '/8 0 internal clock ": counting on '/16 0 1 internal clock ": counting on '/32 0 external clock: counting on tclka pin input 0 1 1 1 external clock: counting on tclkb pin input 0 counting on ti10 pin input (agck) 0 1 counting on multiplied (corrected)(agckm) ti10 pin input clock 0 1 * setting prohibited 1 1 * * setting prohibited * : don't care
rev. 3.0, 09/04, page 239 of 1086 timer control registers 6a, 6b, 7a, 7b (tcr6a, tcr6b, tcr7a, tcr7b) tcr6a, tcr7a bit: 7 6 5 4 3 2 1 0 ? ckselb2 ckselb1 ckselb0 ? cksela2 cksela1 cksela0 initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r/w r/w r r/w r/w r/w tcr6b, tcr7b bit: 7 6 5 4 3 2 1 0 ? ckseld2 ckseld1 ckseld0 ? ckselc2 ckselc1 ckselc0 initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r/w r/w r r/w r/w r/w ? bit 7?reserved: this bit is always read as 0. the write value should always be 0. ? bits 6 to 4?clock select b2 to b0, d2 to d0 (ckselb2 to ckselb0, ckseld2 to ckseld0): these bits select clock ", scaled from the internal clock source, from ', '/2, '/4, '/8, '/16, and '/32. bit 6: ckselx2 bit 5: ckselx1 bit 4: ckselx0 description 0 internal clock ": counting on ' (initial value) 0 1 internal clock ": counting on '/2 0 internal clock ": counting on '/4 0 1 1 internal clock ": counting on '/8 0 internal clock ": counting on '/16 0 1 internal clock ": counting on '/32 0 setting prohibited 1 1 1 setting prohibited x = b or d ? bit 3?reserved: this bit is always read as 0. the write value should always be 0. ? bits 2 to 0?clock select a2 to a0, c2 to c0 (cksela2 to cksela0, ckselc2 to ckselc0): these bits select clock ", scaled from the internal clock source, from ', '/2, '/4, '/8, '/16, and '/32.
rev. 3.0, 09/04, page 240 of 1086 bit 2: ckselx2 bit 1 ckselx1 bit 0 ckselx0 description 0 internal clock ": counting on ' (initial value) 0 1 internal clock ": counting on '/2 0 internal clock ": counting on '/4 0 1 1 internal clock ": counting on '/8 0 internal clock ": counting on '/16 0 1 internal clock ": counting on '/32 0 setting prohibited 1 1 1 setting prohibited x = a or c timer control register 8 (tcr8) bit: 7 6 5 4 3 2 1 0 ? ckselb2 ckselb1 ckselb0 ? cksela2 cksela1 cksela0 initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r/w r/w r r/w r/w r/w the ckselax bits relate to dcnt8a to dcnt8h, and the ckselbx bits relate to dcnt8i to dcnt8p. ? bit 7?reserved: this bit is always read as 0. the write value should always be 0. ? bits 6 to 4?clock select b2 to b0 (ckselb2 to ckselb0): these bits, relating to counters dcnt8i to dcnt8p, select clock ", scaled from the internal clock source, from ', '/2, '/4, '/8, '/16, and '/32. bit 6: ckselb2 bit 5: ckselb1 bit 4: ckselb0 description 0 internal clock ": counting on ' (initial value) 0 1 internal clock ": counting on '/2 0 internal clock ": counting on '/4 0 1 1 internal clock ": counting on '/8 0 internal clock ": counting on '/16 0 1 internal clock ": counting on '/32 0 setting prohibited 1 1 1 setting prohibited ? bit 3?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 241 of 1086 ? bits 2 to 0?clock select a2 to a0 (cksela2 to cksela0): these bits, relating to counters dcnt8a to dcnt8h, select clock ", scaled from the internal clock source, from ', '/2, '/4, '/8, '/16, and '/32. bit 2: cksela2 bit 1: cksela1 bit 0: cksela0 description 0 internal clock ": counting on ' (initial value) 0 1 internal clock ": counting on '/2 0 internal clock ": counting on '/4 0 1 1 internal clock ": counting on '/8 0 internal clock ": counting on '/16 0 1 internal clock ": counting on '/32 0 setting prohibited 1 1 1 setting prohibited timer control registers 9a, 9b, 9c (tcr9a, tcr9b, tcr9c) tcr9a bit: 7 6 5 4 3 2 1 0 ? trg3ben egselb1 egselb0 ? trg3aen egsela1 egsela0 initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r/w r/w r r/w r/w r/w tcr9b bit: 7 6 5 4 3 2 1 0 ? trg3den egseld1 egseld0 ? trg3cen egselc1 egselc0 initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r/w r/w r r/w r/w r/w tcr9c bit: 7 6 5 4 3 2 1 0 ? ? egself1 egself0 ? ? egsele1 egsele0 initial value: 0 0 0 0 0 0 0 0 r/w: r r r/w r/w r r r/w r/w ? bit 7?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 242 of 1086 ? bit 6?trigger channel 3ben, 3den (trg3ben, trg3den): these bits select the channel 9 event counter compare-match signal channel 3 input capture trigger. bit 6: trg3xen description 0 channel 3 input capture trigger in event of channel 9 compare-match (ecnt9x = gr9x) is disabled (initial value) 1 channel 3 input capture trigger in event of channel 9 compare-match (ecnt9x = gr9x) is enabled x = b or d ? bits 5 and 4?edge select b1, b0, d1, d0, f1, f0 (egselb1, egselb0, egseld1, egseld0, egself1, egself0): these bits select the event counter counted edge(s). bit 5: egselx1 bit 4: egselx0 description 0 count disabled (initial value) 0 1 rising edges counted 0 falling edges counted 1 1 both rising and falling edges counted x = b, d, or f ? bit 3?reserved: this bit is always read as 0. the write value should always be 0. ? bit 2?trigger channel 3aen, 3cen (trg3aen, trg3cen): these bits select the channel 9 event counter compare-match signal channel 3 input capture trigger. bit 2: trg3xen description 0 channel 3 input capture trigger in event of channel 9 compare-match (ecnt9x = gr9x) is disabled (initial value) 1 channel 3 input capture trigger in event of channel 9 compare-match (ecnt9x = gr9x) is enabled x = a or c ? bits 1 and 0?edge select a1, a0, c1, c0, e1, e0 (egsela1, egsela0, egselc1, egselc0, egsele1, egsele0): these bits select the event counter counted edge(s).
rev. 3.0, 09/04, page 243 of 1086 bit 1: egselx1 bit 0: egselx0 description 0 count disabled (initial value) 0 1 rising edges counted 0 falling edges counted 1 1 both rising and falling edges counted x = a, c, or e timer control register 11 (tcr11) bit: 7 6 5 4 3 2 1 0 ? ? ckeg1 ckeg0 ? cksela2 cksela1 cksela0 initial value: 0 0 0 0 0 0 0 0 r/w: r r r/w r/w r r/w r/w r/w ? bits 7, 6, and 3?reserved: these bits are always read as 0. the write value should always be 0. ? bits 5 and 4?edge select: these bits select the event counter counted edge(s). bit 5: ckeg1 bit 4: ckeg0 description 0 rising edges counted (initial value) 0 1 falling edges counted 0 both rising and falling edges counted 1 1 count disabled ? bits 2 to 0?clock select a2 to a0 (cksela2 to cksela0): these bits select clock ", scaled from the internal clock source, from ', '/2, '/4, '/8, '/16, and '/32. bit 2: cksela2 bit 1: cksela1 bit 0: cksela0 description 0 internal clock ": counting on ' (initial value) 0 1 internal clock ": counting on '/2 0 internal clock ": counting on '/4 0 1 1 internal clock ": counting on '/8 0 internal clock ": counting on '/16 0 1 internal clock ": counting on '/32 0 external clock: counting on tclka pin input 1 1 1 external clock: counting on tclkb pin input
rev. 3.0, 09/04, page 244 of 1086 11.2.4 timer i/o control registers (tior) the timer i/o control registers (tior) are 8-bit registers. the atu-ii has 16 tior registers: one for channel 0, four each for channels 1 and 2, two each for channels 3 to 5, and one for channel 11. for details of channel 10, see section 11.2.26, channel 10 registers. channel abbreviation function 0 tior0 icr0 edge detection setting 1 tior1a?1d 2 tior2a?2d gr input capture/compare-match switching, edge detection/output value setting 3 tior3a, tior3b 4 tior4a, tior4b 5 tior5a, tior5b gr input capture/compare-match switching, edge detection/output value setting, tcnt3 to tcnt5 clear enable/disable setting 11 tior11 gr input capture/compare-match switching, edge detection/output value setting each tior is an 8-bit readable/writable register used to select the functions of dedicated input capture registers and general registers. for dedicated input capture registers (icr), tior performs edge detection setting. for general registers (gr), tior selects use as an input capture register or output compare register, and performs edge detection setting. for channels 3 to 5, tior also selects enabling or disabling of free-running counter (tcnt) clearing in the event of a compare-match. timer i/o control register 0 (tior0) bit: 7 6 5 4 3 2 1 0 io0d1 io0d0 io0c1 io0c0 io0b1 io0b0 io0a1 io0a0 initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w tior0 specifies edge detection for input capture registers icr0a to icr0d. tior0 is initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode.
rev. 3.0, 09/04, page 245 of 1086 ? bits 7 and 6?i/o control 0d1 and 0d0 (io0d1, io0d0): these bits select ti0d pin input capture signal edge detection. bit 7: io0d1 bit 6: io0d0 description 0 input capture disabled (input capture possible in tcnt10b compare-match) (initial value) 0 1 input capture in icr0d on rising edge 0 input capture in icr0d on falling edge 1 1 input capture in icr0d on both rising and falling edges ? bits 5 and 4?i/o control 0c1 and 0c0 (io0c1, io0c0): these bits select ti0c pin input capture signal edge detection. bit 5: io0c1 bit 4: io0c0 description 0 input capture disabled (initial value) 0 1 input capture in icr0c on rising edge 0 input capture in icr0c on falling edge 1 1 input capture in icr0c on both rising and falling edges ? bits 3 and 2?i/o control 0b1 and 0b0 (io0b1, io0b0): these bits select ti0b pin input capture signal edge detection. bit 3: io0b1 bit 2: io0b0 description 0 input capture disabled (initial value) 0 1 input capture in icr0b on rising edge 0 input capture in icr0b on falling edge 1 1 input capture in icr0b on both rising and falling edges ? bits 1 and 0?i/o control 0a1 and 0a0 (io0a1, io0a0): these bits select ti0a pin input capture signal edge detection. bit 1: io0a1 bit 0: io0a0 description 0 input capture disabled (initial value) 0 1 input capture in icr0a on rising edge 0 input capture in icr0a on falling edge 1 1 input capture in icr0a on both rising and falling edges
rev. 3.0, 09/04, page 246 of 1086 timer i/o control registers 1a to 1d (tior1a to tior1d) tior1a bit: 7 6 5 4 3 2 1 0 ? io1b2 io1b1 io1b0 ? io1a2 io1a1 io1a0 initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r/w r/w r r/w r/w r/w tior1b bit: 7 6 5 4 3 2 1 0 ? io1d2 io1d1 io1d0 ? io1c2 io1c1 io1c0 initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r/w r/w r r/w r/w r/w tior1c bit: 7 6 5 4 3 2 1 0 ? io1f2 io1f1 io1f0 ? io1e2 io1e1 io1e0 initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r/w r/w r r/w r/w r/w tior1d bit: 7 6 5 4 3 2 1 0 ? io1h2 io1h1 io1h0 ? io1g2 io1g1 io1g0 initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r/w r/w r r/w r/w r/w registers tior1a to tior1d specify whether general registers gr1a to gr1h are used as input capture or compare-match registers, and also perform edge detection and output value setting. each tior is initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode. ? bit 7?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 247 of 1086 ? bits 6 to 4?i/o control 1b2 to 1b0, 1d2 to 1d0, 1f2 to 1f0, 1h2 to 1h0 (io1b2 to io1b0, io1d2 to io1d0, iof12 to io1f0, io1h2 to io1h0): these bits select the general register (gr) function. bit 6: io1x2 bit 5: io1x1 bit 4: io1x0 description 0 compare-match disabled; pin output undefined (initial value) 0 1 0 output on gr compare-match 0 1 output on gr compare-match 0 1 1 gr is an output compare register toggle output on gr compare-match 0 input capture disabled (gr cannot be written to) 0 1 input capture in gr on rising edge at tio1x pin (gr cannot be written to) 0 input capture in gr on falling edge at tio1x pin (gr cannot be written to) 1 1 1 gr is an input capture register input capture in gr on both rising and falling edges at tio1x pin (gr cannot be written to) x = b, d, f, or h ? bit 3?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 248 of 1086 ? bits 2 to 0?i/o control 1a2 to 1a0, 1c2 to 1c0, 1e2 to 1e0, 1g2 to 1g0 (io1a2 to io1a0, io1c2 to io1c0, io1e2 to io1e0, io1g2 to io1g0): these bits select the general register (gr) function. bit 2: io1x2 bit 1: io1x1 bit 0: io1x0 description 0 compare-match disabled; pin output undefined (initial value) 0 1 0 output on gr compare-match 0 1 output on gr compare-match 0 1 1 gr is an output compare register toggle output on gr compare-match 0 input capture disabled 0 1 input capture in gr on rising edge at tio1x pin (gr cannot be written to) 0 input capture in gr on falling edge at tio1x pin (gr cannot be written to) 1 1 1 gr is an input capture register input capture in gr on both rising and falling edges at tio1x pin (gr cannot be written to) x = a, c, e, or g
rev. 3.0, 09/04, page 249 of 1086 timer i/o control registers 2a to 2d (tior2a to tior2d) tior2a bit: 7 6 5 4 3 2 1 0 ? io2b2 io2b1 io2b0 ? io2a2 io2a1 io2a0 initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r/w r/w r r/w r/w r/w tior2b bit: 7 6 5 4 3 2 1 0 ? io2d2 io2d1 io2d0 ? io2c2 io2c1 io2c0 initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r/w r/w r r/w r/w r/w tior2c bit: 7 6 5 4 3 2 1 0 ? io2f2 io2f1 io2f0 ? io2e2 io2e1 io2e0 initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r/w r/w r r/w r/w r/w tior2d bit: 7 6 5 4 3 2 1 0 ? io2h2 io2h1 io2h0 ? io2g2 io2g1 io2g0 initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r/w r/w r r/w r/w r/w registers tior2a to tior2d specify whether general registers gr2a to gr2h are used as input capture or compare-match registers, and also perform edge detection and output value setting. each tior is initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode.
rev. 3.0, 09/04, page 250 of 1086 ? bit 7?reserved: this bit is always read as 0. the write value should always be 0. ? bits 6 to 4?i/o control 2b2 to 2b0, 2d2 to 2d0, 2f2 to 2f0, 2h2 to 2h0 (io2b2 to io2b0, io2d2 to io2d0, io2f2 to io2f0, io2h2 to io2h0): these bits select the general register (gr) function. bit 6: io2x2 bit 5: io2x1 bit 4: io2x0 description 0 compare-match disabled; pin output undefined (initial value) 0 1 0 output on gr compare-match 0 1 output on gr compare-match 0 1 1 gr is an output compare register toggle output on gr compare-match 0 input capture disabled 0 1 input capture in gr on rising edge at tio2x pin (gr cannot be written to) 0 input capture in gr on falling edge at tio2x pin (gr cannot be written to) 1 1 1 gr is an input capture register input capture in gr on both rising and falling edges at tio2x pin (gr cannot be written to) x = b, d, f, or h ? bit 3?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 251 of 1086 ? bits 2 to 0?i/o control 2a2 to 2a0, 2c2 to 2c0, 2e2 to 2e0, 2g2 to 2g0 (io2a2 to io2a0, io2c2 to io2c0, io2e2 to io2e0, io2g2 to io2g0): these bits select the general register (gr) function. bit 2: io2x2 bit 1: io2x1 bit 0: io2x0 description 0 compare-match disabled; pin output undefined (initial value) 0 1 0 output on gr compare-match 0 1 output on gr compare-match 0 1 1 gr is an output compare register toggle output on gr compare-match 0 input capture disabled 0 1 input capture in gr on rising edge at tio2x pin (gr cannot be written to) 0 input capture in gr on falling edge at tio2x pin (gr cannot be written to) 1 1 1 gr is an input capture register input capture in gr on both rising and falling edges at tio2x pin (gr cannot be written to) x = a, c, e, or g
rev. 3.0, 09/04, page 252 of 1086 timer i/o control registers 3a, 3b, 4a, 4b, 5a, 5b (tior3a, tior3b, tior4a, tior4b, tior5a, tior5b) tior3a, tior4a, tior5a bit: 7 6 5 4 3 2 1 0 ccixb ioxb2 ioxb1 ioxb0 ccixa ioxa2 ioxa1 ioxa0 initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w x = 3 to 5 tior3b, tior4b, tior5b bit: 7 6 5 4 3 2 1 0 ccixd ioxd2 ioxd1 ioxd0 ccixc ioxc2 ioxc1 ioxc0 initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w x = 3 to 5 tior3a, tior3b, tior4a, tior4b, tior5a, and tior5b specify whether general registers gr3a to gr3d, gr4a to gr4d, and gr5a to gr5d are used as input capture or compare- match registers, and also perform edge detection and output value setting. they also select enabling or disabling of free-running counter (tcnt3 to tcnt5) clearing on compare-match. each tior is initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode. ? bit 7?clear counter enable flag 3b, 4b, 5b, 3d, 4d, 5d (cci3b, cci4b, cci5b, cci3d, cci4d, cci5d): these bits select enabling or disabling of free-running counter (tcnt) clearing. bit 7: ccixx description 0 tcnt clearing disabled (initial value) 1 tcnt cleared on gr compare-match xx = 3b, 4b, 5b, 3d, 4d, or 5d tcnt is cleared on compare-match only when gr is functioning as an output compare register.
rev. 3.0, 09/04, page 253 of 1086 ? bits 6 to 4?i/o control 3b2 to 3b0, 4b2 to 4b0, 5b2 to 5b0, 3d2 to 3d0, 4d2 to 4d0, 5d2 to 5d0 (io3b2 to io3b0, io4b2 to io4b0, io5b2 to io5b0, io3d2 to io3d0, io4d2 to io4d0, io5d2 to io5d0): these bits select the general register (gr) function. bit 6: ioxx2 bit 5: ioxx1 bit 4: ioxx0 description 0 compare-match disabled; pin output undefined (initial value) 0 1 0 output on gr compare-match 0 1 output on gr compare-match 0 1 1 gr is an output compare register toggle output on gr compare-match 0 input capture disabled (in channel 3 only, gr cannot be written to) 0 1 input capture in gr on rising edge at tioxx pin (gr cannot be written to) 0 input capture in gr on falling edge at tioxx pin (gr cannot be written to) 1 1 1 gr is an input capture register (input capture by channel 3 and 9 compare-match enabled) input capture in gr on both rising and falling edges at tioxx pin (gr cannot be written to) xx = 3b, 4b, 5b, 3d, 4d, or 5d ? bit 3?clear counter enable flag 3a, 4a, 5a, 3c, 4c, 5c (cci3a, cci4a, cci5a, cci3c, cci4c, cci5c): these bits select enabling or disabling of free-running counter (tcnt) clearing. bit 3: ccixx description 0 tcnt clearing disabled (initial value) 1 tcnt cleared on gr compare-match xx = 3a, 4a, 5a, 3c, 4c, or 5c tcnt is cleared on compare-match only when gr is functioning as an output compare register.
rev. 3.0, 09/04, page 254 of 1086 ? bits 2 to 0?i/o control 3a2 to 3a0, 4a2 to 4a0, 5a2 to 5a0, 3c2 to 3c0, 4c2 to 4c0, 5c2 to 5c0 (io3a2 to io3a0, io4a2 to io4a0, io5a2 to io5a0, io3c2 to io3c0, io4c2 to io4c0, io5c2 to io5c0): these bits select the general register (gr) function. bit 2: ioxx2 bit 1: ioxx1 bit 0: ioxx0 description 0 compare-match disabled; pin output undefined (initial value) 0 1 0 output on gr compare-match 0 1 output on gr compare-match 0 1 1 gr is an output compare register toggle output on gr compare-match 0 input capture disabled (in channel 3 only, gr cannot be written to) 0 1 input capture in gr on rising edge at tioxx pin (gr connot be written to) 0 input capture in gr on falling edge at tioxx pin (gr connot be written to) 1 1 1 gr is an input capture register (input capture by channel 3 and 9 compare-match enabled) input capture in gr on both rising and falling edges at tioxx pin (gr connot be written to) xx = 3a, 4a, 5a, 3c, 4c, or 5c timer i/o control register 11 (tior11) tior11 bit: 7 6 5 4 3 2 1 0 ? io11b2 io11b1 io11b0 ? io11a2 io11a1 io11a0 initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r/w r/w r r/w r/w r/w tior11 specifies whether general registers gr11a and gr11b are used as input capture or compare-match registers, and also performs edge detection and output value setting. tior11 is initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode. ? bit 7?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 255 of 1086 ? bits 6 to 4?i/o control 11b2 to 11b0 (io11b2 to io11b0): these bits select the general register (gr) function. bit 6: io11b2 bit 5: io11b1 bit 4: io11b0 description 0 compare-match disabled; pin output undefined (initial value) 0 1 0 output on gr compare-match 0 1 output on gr compare-match 0 1 1 gr is an output compare register toggle output on gr compare-match 0 input capture disabled 0 1 input capture in gr on rising edge at tio11b pin (gr cannot be written to) 0 input capture in gr on falling edge at tio11b pin (gr cannot be written to) 1 1 1 gr is an input capture register input capture in gr on both rising and falling edges at tio11b pin (gr cannot be written to) ? bit 3?reserved: this bit is always read as 0. the write value should always be 0. ? bits 2 to 0?i/o control 11a2 to 11a0 (io11a2 to io11a0): these bits select the general register (gr) function. bit 2: io11a2 bit 1: io11a1 bit 0: io11a0 description 0 compare-match disabled; pin output undefined (initial value) 0 1 0 output on gr compare-match 0 1 output on gr compare-match 0 1 1 gr is an output compare register toggle output on gr compare-match 0 input capture disabled 0 1 input capture in gr on rising edge at tio11a pin (gr cannot be written to) 0 input capture in gr on falling edge at tio11a pin (gr cannot be written to) 1 1 1 gr is an input capture register input capture in gr on both rising and falling edges at tio11a pin (gr cannot be written to)
rev. 3.0, 09/04, page 256 of 1086 11.2.5 timer status registers (tsr) the timer status registers (tsr) are 16-bit registers. the atu-ii has 11 tsr registers: one each for channels 0, 6 to 9, and 11, two each for channels 1 and 2, and one for channels 3 to 5. for details of channel 10, see section 11.2.26, channel 10 registers. channel abbreviation function 0 tsr0 indicates input capture, interval interrupt, and overflow status 1 tsr1a, tsr1b 2 tsr2a, tsr2b indicate input capture, compare-match, and overflow status 3 4 5 tsr3 indicates input capture, compare-match, and overflow status 6 tsr6 7 tsr7 indicate cycle register compare-match status 8 tsr8 indicates down-counter output end (low) status 9 tsr9 indicates event counter compare-match status 11 tsr11 indicates input capture, compare-match, and overflow status the tsr registers are 16-bit readable/writable registers containing flags that indicate free-running counter (tcnt) overflow, channel 0 input capture or interval interrupt generation, channel 3, 4, 5, and 11 general register input capture or compare-match, channel 6 and 7 compare-matches, channel 8 down-counter output end, and channel 9 event counter compare-matches. each flag is an interrupt source, and issues an interrupt request to the cpu if the interrupt is enabled by the corresponding bit in the timer interrupt enable register (tier). each tsr is initialized to h'0000 by a power-on reset, and in hardware standby mode and software standby mode.
rev. 3.0, 09/04, page 257 of 1086 timer status register 0 (tsr0) tsr0 indicates the status of channel 0 interval interrupts, input capture, and overflow. bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ? initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r bit: 7 6 5 4 3 2 1 0 iif2b iif2a iif1 ovf0 icf0d icf0c icf0b icf0a initial value: 0 0 0 0 0 0 0 0 r/w: r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * note: * only 0 can be written to clear the flag. ? bits 15 to 8?reserved: these bits are always read as 0. the write value should always be 0. ? bit 7?interval interrupt flag 2b (iif2b): status flag that indicates the generation of an interval interrupt. bit 7: iif2b description 0 [clearing condition] (initial value) when iif2b is read while set to 1, then 0 is written to iif2b 1 [setting condition] when interval interrupt selected by itvrr2b is generated ? bit 6?interval interrupt flag 2a (iif2a): status flag that indicates the generation of an interval interrupt. bit 6: iif2a description 0 [clearing condition] (initial value) when iif2a is read while set to 1, then 0 is written to iif2a 1 [setting condition] when interval interrupt selected by itvrr2a is generated
rev. 3.0, 09/04, page 258 of 1086 ? bit 5?interval interrupt flag 1 (iif1): status flag that indicates the generation of an interval interrupt. bit 5: iif1 description 0 [clearing condition] (initial value) when iif1 is read while set to 1, then 0 is written to iif1 1 [setting condition] when interval interrupt selected by itvrr1 is generated ? bit 4?overflow flag 0 (ovf0): status flag that indicates tcnt0 overflow. bit 4: ovf0 description 0 [clearing condition] (initial value) when ovf0 is read while set to 1, then 0 is written to ovf0 1 [setting condition] when the tcnt0 value overflows (from h'ffffffff to h'00000000) ? bit 3?input capture flag 0d (icf0d): status flag that indicates icr0d input capture. bit 3: icf0d description 0 [clearing condition] (initial value) when icf0d is read while set to 1, then 0 is written to icf0d 1 [setting condition] when the tcnt0 value is transferred to the input capture register by an input capture signal. also set by input capture with a channel 10 compare match as the trigger ? bit 2?input capture flag 0c (icf0c): status flag that indicates icr0c input capture. bit 2: icf0c description 0 [clearing condition] (initial value) when icf0c is read while set to 1, then 0 is written to icf0c 1 [setting condition] when the tcnt0 value is transferred to the input capture register by an input capture signal
rev. 3.0, 09/04, page 259 of 1086 ? bit 1?input capture flag 0b (icf0b): status flag that indicates icr0b input capture. bit 1: icf0b description 0 [clearing condition] (initial value) when icf0b is read while set to 1, then 0 is written to icf0b 1 [setting condition] when the tcnt0 value is transferred to the input capture register by an input capture signal ? bit 0?input capture flag 0a (icf0a): status flag that indicates icr0a input capture. bit 0: icf0a description 0 [clearing condition] (initial value) when icf0a is read while set to 1, then 0 is written to icf0a 1 [setting condition] when the tcnt0 value is transferred to the input capture register by an input capture signal timer status registers 1a and 1b (tsr1a, tsr1b) tsr1a: tsr1a indicates the status of channel 1 input capture, compare-match, and overflow. bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ovf1a initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r/(w) * bit: 7 6 5 4 3 2 1 0 imf1h imf1g imf1f imf1e imf1d imf1c imf1b imf1a initial value: 0 0 0 0 0 0 0 0 r/w: r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * note: * only 0 can be written, to clear the flag. ? bits 15 to 9?reserved: these bits are always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 260 of 1086 ? bit 8?overflow flag 1a (ovf1a): status flag that indicates tcnt1a overflow. bit 8: ovf1a description 0 [clearing condition] (initial value) when ovf1a is read while set to 1, then 0 is written to ovf1a 1 [setting condition] when the tcnt1a value overflows (from h'ffff to h'0000) ? bit 7?input capture/compare-match flag 1h (imf1h): status flag that indicates gr1h input capture or compare-match. bit 7: imf1h description 0 [clearing condition] (initial value) when imf1h is read while set to 1, then 0 is written to imf1h 1 [setting conditions] ? when the tcnt1a value is transferred to gr1h by an input capture signal while gr1h is functioning as an input capture register ? when tcnt1a = gr1h while gr1h is functioning as an output compare register ? bit 6?input capture/compare-match flag 1g (imf1g): status flag that indicates gr1g input capture or compare-match. bit 6: imf1g description 0 [clearing condition] (initial value) when imf1g is read while set to 1, then 0 is written to imf1g 1 [setting conditions] ? when the tcnt1a value is transferred to gr1g by an input capture signal while gr1g is functioning as an input capture register ? when tcnt1a = gr1g while gr1g is functioning as an output compare register
rev. 3.0, 09/04, page 261 of 1086 ? bit 5?input capture/compare-match flag 1f (imf1f): status flag that indicates gr1f input capture or compare-match. bit 5: imf1f description 0 [clearing condition] (initial value) when imf1f is read while set to 1, then 0 is written to imf1f 1 [setting conditions] ? when the tcnt1a value is transferred to gr1f by an input capture signal while gr1f is functioning as an input capture register ? when tcnt1a = gr1f while gr1f is functioning as an output compare register ? bit 4?input capture/compare-match flag 1e (imf1e): status flag that indicates gr1e input capture or compare-match. bit 4: imf1e description 0 [clearing condition] (initial value) when imf1e is read while set to 1, then 0 is written to imf1e 1 [setting conditions] ? when the tcnt1a value is transferred to gr1e by an input capture signal while gr1e is functioning as an input capture register ? when tcnt1a = gr1e while gr1e is functioning as an output compare register ? bit 3?input capture/compare-match flag 1d (imf1d): status flag that indicates gr1d input capture or compare-match. bit 3: imf1d description 0 [clearing condition] (initial value) when imf1d is read while set to 1, then 0 is written to imf1d 1 [setting conditions] ? when the tcnt1a value is transferred to gr1d by an input capture signal while gr1d is functioning as an input capture register ? when tcnt1a = gr1d while gr1d is functioning as an output compare register
rev. 3.0, 09/04, page 262 of 1086 ? bit 2?input capture/compare-match flag 1c (imf1c): status flag that indicates gr1c input capture or compare-match. bit 2: imf1c description 0 [clearing condition] (initial value) when imf1c is read while set to 1, then 0 is written to imf1c 1 [setting conditions] ? when the tcnt1a value is transferred to gr1c by an input capture signal while gr1c is functioning as an input capture register ? when tcnt1a = gr1c while gr1c is functioning as an output compare register ? bit 1?input capture/compare-match flag 1b (imf1b): status flag that indicates gr1b input capture or compare-match. bit 1: imf1b description 0 [clearing condition] (initial value) when imf1b is read while set to 1, then 0 is written to imf1b 1 [setting conditions] ? when the tcnt1a value is transferred to gr1b by an input capture signal while gr1b is functioning as an input capture register ? when tcnt1a = gr1b while gr1b is functioning as an output compare register ? bit 0?input capture/compare-match flag 1a (imf1a): status flag that indicates gr1a input capture or compare-match. bit 0: imf1a description 0 [clearing condition] (initial value) when imf1a is read while set to 1, then 0 is written to imf1a 1 [setting conditions] ? when the tcnt1a value is transferred to gr1a by an input capture signal while gr1a is functioning as an input capture register ? when tcnt1a = gr1a while gr1a is functioning as an output compare register
rev. 3.0, 09/04, page 263 of 1086 tsr1b: tsr1b indicates the status of channel 1 compare-match and overflow. bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ovf1b initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r/(w) * bit: 7 6 5 4 3 2 1 0 ? ? ? ? ? ? ? cmf1 initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r/(w) * note: * only 0 can be written, to clear the flag. ? bits 15 to 9?reserved: these bits are always read as 0. the write value should always be 0. ? bit 8?overflow flag 1b (ovf1b): status flag that indicates tcnt1b overflow. bit 8: ovf1b description 0 [clearing condition] (initial value) when ovf1b is read while set to 1, then 0 is written to ovf1b 1 [setting condition] when the tcnt1b value overflows (from h'ffff to h'0000) ? bits 7 to 1?reserved: these bits are always read as 0. the write value should always be 0. ? bit 0?compare-match flag 1 (cmf1): status flag that indicates ocr1 compare-match. bit 0: cmf1 description 0 [clearing condition] (initial value) when cmf1 is read while set to 1, then 0 is written to cmf1 1 [setting condition] when tcnt1b = ocr1
rev. 3.0, 09/04, page 264 of 1086 timer status registers 2a and 2b (tsr2a, tsr2b) tsr2a: tsr2a indicates the status of channel 2 input capture, compare-match, and overflow. bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ovf2a initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r/(w) * bit: 7 6 5 4 3 2 1 0 imf2h imf2g imf2f imf2e imf2d imf2c imf2b imf2a initial value: 0 0 0 0 0 0 0 0 r/w: r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * note: * only 0 can be written to clear the flag. ? bits 15 to 9?reserved: these bits are always read as 0. the write value should always be 0. ? bit 8?overflow flag 2a (ovf2a): status flag that indicates tcnt2a overflow. bit 8: ovf2a description 0 [clearing condition] (initial value) when ovf2a is read while set to 1, then 0 is written to ovf2a 1 [setting condition] when the tcnt2a value overflows (from h'ffff to h'0000) ? bit 7?input capture/compare-match flag 2h (imf2h): status flag that indicates gr2h input capture or compare-match. bit 7: imf2h description 0 [clearing condition] (initial value) when imf2h is read while set to 1, then 0 is written to imf2h 1 [setting conditions] ? when the tcnt2a value is transferred to gr2h by an input capture signal while gr2h is functioning as an input capture register ? when tcnt2a = gr2h while gr2h is functioning as an output compare register
rev. 3.0, 09/04, page 265 of 1086 ? bit 6?input capture/compare-match flag 2g (imf2g): status flag that indicates gr2g input capture or compare-match. bit 6: imf2g description 0 [clearing condition] (initial value) when imf2g is read while set to 1, then 0 is written to imf2g 1 [setting conditions] ? when the tcnt2a value is transferred to gr2g by an input capture signal while gr2g is functioning as an input capture register ? when tcnt2a = gr2g while gr2g is functioning as an output compare register ? bit 5?input capture/compare-match flag 2f (imf2f): status flag that indicates gr2f input capture or compare-match. bit 5: imf2f description 0 [clearing condition] (initial value) when imf2f is read while set to 1, then 0 is written to imf2f 1 [setting conditions] ? when the tcnt2a value is transferred to gr2f by an input capture signal while gr2f is functioning as an input capture register ? when tcnt2a = gr2f while gr2f is functioning as an output compare register ? bit 4?input capture/compare-match flag 2e (imf2e): status flag that indicates gr2e input capture or compare-match. bit 4: imf2e description 0 [clearing condition] (initial value) when imf2e is read while set to 1, then 0 is written to imf2e 1 [setting conditions] ? when the tcnt2a value is transferred to gr2e by an input capture signal while gr2e is functioning as an input capture register ? when tcnt2a = gr2e while gr2e is functioning as an output compare register
rev. 3.0, 09/04, page 266 of 1086 ? bit 3?input capture/compare-match flag 2d (imf2d): status flag that indicates gr2d input capture or compare-match. bit 3: imf2d description 0 [clearing condition] (initial value) when imf2d is read while set to 1, then 0 is written to imf2d 1 [setting conditions] ? when the tcnt2a value is transferred to gr2d by an input capture signal while gr2d is functioning as an input capture register ? when tcnt2a = gr2d while gr2d is functioning as an output compare register ? bit 2?input capture/compare-match flag 2c (imf2c): status flag that indicates gr2c input capture or compare-match. bit 2: imf2c description 0 [clearing condition] (initial value) when imf2c is read while set to 1, then 0 is written to imf2c 1 [setting conditions] ? when the tcnt2a value is transferred to gr2c by an input capture signal while gr2c is functioning as an input capture register ? when tcnt2a = gr2c while gr2c is functioning as an output compare register ? bit 1?input capture/compare-match flag 2b (imf2b): status flag that indicates gr2b input capture or compare-match. bit 1: imf2b description 0 [clearing condition] (initial value) when imf2b is read while set to 1, then 0 is written to imf2b 1 [setting conditions] ? when the tcnt2a value is transferred to gr2b by an input capture signal while gr2b is functioning as an input capture register ? when tcnt2a = gr2b while gr2b is functioning as an output compare register
rev. 3.0, 09/04, page 267 of 1086 ? bit 0?input capture/compare-match flag 2a (imf2a): status flag that indicates gr2a input capture or compare-match. bit 0: imf2a description 0 [clearing condition] (initial value) when imf2a is read while set to 1, then 0 is written to imf2a 1 [setting conditions] ? when the tcnt2a value is transferred to gr2a by an input capture signal while gr2a is functioning as an input capture register ? when tcnt2a = gr2a while gr2a is functioning as an output compare register tsr2b: tsr2b indicates the status of channel 2 compare-match and overflow. bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ovf2b initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r/(w) * bit: 7 6 5 4 3 2 1 0 cmf2h cmf2g cmf2f cmf2e cmf2d cmf2c cmf2b cmf2a initial value: 0 0 0 0 0 0 0 0 r/w: r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * note: * only 0 can be written to clear the flag. ? bits 15 to 9?reserved: these bits are always read as 0. the write value should always be 0. ? bit 8?overflow flag 2b (ovf2b): status flag that indicates tcnt2b overflow. bit 8: ovf2b description 0 [clearing condition] (initial value) when ovf2b is read while set to 1, then 0 is written to ovf2b 1 [setting condition] when the tcnt2b value overflows (from h'ffff to h'0000)
rev. 3.0, 09/04, page 268 of 1086 ? bit 7?compare-match flag 2h (cmf2h): status flag that indicates ocr2h compare-match. bit 7: cmf2h description 0 [clearing condition] (initial value) when cmf2h is read while set to 1, then 0 is written to cmf2h 1 [setting condition] when tcnt2b = ocr2h ? bit 6?compare-match flag 2g (cmf2g): status flag that indicates ocr2g compare-match. bit 6: cmf2g description 0 [clearing condition] (initial value) when cmf2g is read while set to 1, then 0 is written to cmf2g 1 [setting condition] when tcnt2b = ocr2g ? bit 5?compare-match flag 2f (cmf2f): status flag that indicates ocr2f compare-match. bit 5: cmf2f description 0 [clearing condition] (initial value) when cmf2f is read while set to 1, then 0 is written to cmf2f 1 [setting condition] when tcnt2b = ocr2f ? bit 4?compare-match flag 2e (cmf2e): status flag that indicates ocr2e compare-match. bit 4: cmf2e description 0 [clearing condition] (initial value) when cmf2e is read while set to 1, then 0 is written to cmf2e 1 [setting condition] when tcnt2b = ocr2e ? bit 3?compare-match flag 2d (cmf2d): status flag that indicates ocr2d compare-match. bit 3: cmf2d description 0 [clearing condition] (initial value) when cmf2d is read while set to 1, then 0 is written to cmf2d 1 [setting condition] when tcnt2b = ocr2d
rev. 3.0, 09/04, page 269 of 1086 ? bit 2?compare-match flag 2c (cmf2c): status flag that indicates ocr2c compare-match. bit 2: cmf2c description 0 [clearing condition] (initial value) when cmf2c is read while set to 1, then 0 is written to cmf2c 1 [setting condition] when tcnt2b = ocr2c ? bit 1?compare-match flag 2b (cmf2b): status flag that indicates ocr2b compare-match. bit 1: cmf2b description 0 [clearing condition] (initial value) when cmf2b is read while set to 1, then 0 is written to cmf2b 1 [setting condition] when tcnt2b = ocr2b ? bit 0?compare-match flag 2a (cmf2a): status flag that indicates ocr2a compare-match. bit 0: cmf2a description 0 [clearing condition] (initial value) when cmf2a is read while set to 1, then 0 is written to cmf2a 1 [setting condition] when tcnt2b = ocr2a timer status register 3 (tsr3) tsr3 indicates the status of channel 3 to 5 input capture, compare-match, and overflow. bit: 15 14 13 12 11 10 9 8 ? ovf5 imf5d imf5c imf5b imf5a ovf4 imf4d initial value: 0 0 0 0 0 0 0 0 r/w: r r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * bit: 7 6 5 4 3 2 1 0 imf4c imf4b imf4a ovf3 imf3d imf3c imf3b imf3a initial value: 0 0 0 0 0 0 0 0 r/w: r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * note: * only 0 can be written to clear the flag.
rev. 3.0, 09/04, page 270 of 1086 ? bit 15?reserved: this bit is always read as 0. the write value should always be 0. ? bit 14?overflow flag 5 (ovf5): status flag that indicates tcnt5 overflow. bit 14: ovf5 description 0 [clearing condition] (initial value) when ovf5 is read while set to 1, then 0 is written to ovf5 1 [setting condition] when the tcnt5 value overflows (from h'ffff to h'0000) ? bit 13?input capture/compare-match flag 5d (imf5d): status flag that indicates gr5d input capture or compare-match. bit 13: imf5d description 0 [clearing condition] (initial value) when imf5d is read while set to 1, then 0 is written to imf5d 1 [setting conditions] ? when the tcnt5 value is transferred to gr5d by an input capture signal while gr5d is functioning as an input capture register ? when tcnt5 = gr5d while gr5d is functioning as an output compare register ? when tcnt5 = gr5d while gr5d is functioning as a cycle register in pwm mode ? bit 12?input capture/compare-match flag 5c (imf5c): status flag that indicates gr5c input capture or compare-match. the flag is not set in pwm mode. bit 12: imf5c description 0 [clearing condition] (initial value) when imf5c is read while set to 1, then 0 is written to imf5c 1 [setting conditions] ? when the tcnt5 value is transferred to gr5c by an input capture signal while gr5c is functioning as an input capture register ? when tcnt5 = gr5c while gr5c is functioning as an output compare register
rev. 3.0, 09/04, page 271 of 1086 ? bit 11?input capture/compare-match flag 5b (imf5b): status flag that indicates gr5b input capture or compare-match. the flag is not set in pwm mode. bit 11: imf5b description 0 [clearing condition] (initial value) when imf5b is read while set to 1, then 0 is written to imf5b 1 [setting conditions] ? when the tcnt5 value is transferred to gr5b by an input capture signal while gr5b is functioning as an input capture register ? when tcnt5 = gr5b while gr5b is functioning as an output compare register ? bit 10?input capture/compare-match flag 5a (imf5a): status flag that indicates gr5a input capture or compare-match. the flag is not set in pwm mode. bit 10: imf5a description 0 [clearing condition] (initial value) when imf5a is read while set to 1, then 0 is written to imf5a 1 [setting conditions] ? when the tcnt5 value is transferred to gr5a by an input capture signal while gr5a is functioning as an input capture register ? when tcnt5 = gr5a while gr5a is functioning as an output compare register ? bit 9?overflow flag 4 (ovf4): status flag that indicates tcnt4 overflow. bit 9: ovf4 description 0 [clearing condition] (initial value) when ovf4 is read while set to 1, then 0 is written to ovf4 1 [setting condition] when the tcnt4 value overflows (from h'ffff to h'0000)
rev. 3.0, 09/04, page 272 of 1086 ? bit 8?input capture/compare-match flag 4d (imf4d): status flag that indicates gr4d input capture or compare-match. bit 8: imf4d description 0 [clearing condition] (initial value) when imf4d is read while set to 1, then 0 is written to imf4d 1 [setting conditions] ? when the tcnt4 value is transferred to gr4d by an input capture signal while gr4d is functioning as an input capture register ? when tcnt4 = gr4d while gr4d is functioning as an output compare register ? when tcnt4 = gr4d while gr4d is functioning as a pwm mode synchronous register ? bit 7?input capture/compare-match flag 4c (imf4c): status flag that indicates gr4c input capture or compare-match. the flag is not set in pwm mode. bit 7: imf4c description 0 [clearing condition] (initial value) when imf4c is read while set to 1, then 0 is written to imf4c 1 [setting conditions] ? when the tcnt4 value is transferred to gr4c by an input capture signal while gr4c is functioning as an input capture register ? when tcnt4 = gr4c while gr4c is functioning as an output compare register ? bit 6?input capture/compare-match flag 4b (imf4b): status flag that indicates gr4b input capture or compare-match. the flag is not set in pwm mode. bit 6: imf4b description 0 [clearing condition] (initial value) when imf4b is read while set to 1, then 0 is written to imf4b 1 [setting conditions] ? when the tcnt4 value is transferred to gr4b by an input capture signal while gr4b is functioning as an input capture register ? when tcnt4 = gr4b while gr4b is functioning as an output compare register
rev. 3.0, 09/04, page 273 of 1086 ? bit 5?input capture/compare-match flag 4a (imf4a): status flag that indicates gr4a input capture or compare-match. the flag is not set in pwm mode. bit 5: imf4a description 0 [clearing condition] (initial value) when imf4a is read while set to 1, then 0 is written to imf4a 1 [setting conditions] ? when the tcnt4 value is transferred to gr4a by an input capture signal while gr4a is functioning as an input capture register ? when tcnt4 = gr4a while gr4a is functioning as an output compare register ? bit 4?overflow flag 3 (ovf3): status flag that indicates tcnt3 input capture or compare- match. bit 4: ovf3 description 0 [clearing condition] (initial value) when ovf3 is read while set to 1, then 0 is written to ovf3 1 [setting condition] when the tcnt3 value overflows (from h'ffff to h'0000) ? bit 3?input capture/compare-match flag 3d (imf3d): status flag that indicates gr5d input capture or compare-match. bit 3: imf3d description 0 [clearing condition] (initial value) when imf3d is read while set to 1, then 0 is written to imf3d 1 [setting conditions] ? when the tcnt3 value is transferred to gr3d by an input capture signal while gr3d is functioning as an input capture register. however, imf3d is not set by input capture with a channel 9 compare match as the trigger ? when tcnt3 = gr3d while gr3d is functioning as an output compare register ? when tcnt3 = gr3d while gr3d is functioning as a synchronous register in pwm mode
rev. 3.0, 09/04, page 274 of 1086 ? bit 2?input capture/compare-match flag 3c (imf3c): status flag that indicates gr3c input capture or compare-match. the flag is not set in pwm mode. bit 2: imf3c description 0 [clearing condition] (initial value) when imf3c is read while set to 1, then 0 is written to imf3c 1 [setting conditions] ? when the tcnt3 value is transferred to gr3c by an input capture signal while gr3c is functioning as an input capture register. however, imf3c is not set by input capture with a channel 9 compare match as the trigger ? when tcnt3 = gr3c while gr3c is functioning as an output compare register ? bit 1?input capture/compare-match flag 3b (imf3b): status flag that indicates gr3b input capture or compare-match. the flag is not set in pwm mode. bit 1: imf3b description 0 [clearing condition] (initial value) when imf3b is read while set to 1, then 0 is written to imf3b 1 [setting conditions] ? when the tcnt3 value is transferred to gr3b by an input capture signal while gr3b is functioning as an input capture register. however, imf3b is not set by input capture with a channel 9 compare match as the trigger ? when tcnt3 = gr3b while gr3b is functioning as an output compare register ? bit 0?input capture/compare-match flag 3a (imf3a): status flag that indicates gr3a input capture or compare-match. the flag is not set in pwm mode. bit 0: imf3a description 0 [clearing condition] (initial value) when imf3a is read while set to 1, then 0 is written to imf3a 1 [setting conditions] ? when the tcnt3 value is transferred to gr3a by an input capture signal while gr3a is functioning as an input capture register. however, imf3a is not set by input capture with a channel 9 compare match as the trigger ? when tcnt3 = gr3a while gr3a is functioning as an output compare register
rev. 3.0, 09/04, page 275 of 1086 timer status registers 6 and 7 (tsr6, tsr7) tsr6 and trs7 indicate the channel 6 and 7 free-running counter up-count and down-count status, and cycle register compare status. bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ? initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r bit: 7 6 5 4 3 2 1 0 udxd udxc udxb udxa cmfxd cmfxc cmfxb cmfxa initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r/(w) * r/(w) * r/(w) * r/(w) * note: * only 0 can be written to clear the flag. x = 6 or 7 udxa to udxd relate to tsr6 only. bits relating to tsr7 always read 0. ? bits 15 to 8?reserved: these bits are always read as 0. the write value should always be 0. ? bit 7?count-up/count-down flag 6d (ud6d): status flag that indicates the tcnt6d count operation. bit 7: ud6d description 0 free-running counter tcnt6d operates as an up-counter 1 free-running counter tcnt6d operates as a down-counter ? bit 6?count-up/count-down flag 6c (ud6c): status flag that indicates the tcnt6c count operation. bit 6: ud6c description 0 free-running counter tcnt6c operates as an up-counter 1 free-running counter tcnt6c operates as a down-counter
rev. 3.0, 09/04, page 276 of 1086 ? bit 5?count-up/count-down flag 6b (ud6b): status flag that indicates the tcnt6b count operation. bit 5: ud6b description 0 free-running counter tcnt6b operates as an up-counter 1 free-running counter tcnt6b operates as a down-counter ? bit 4?count-up/count-down flag 6a (ud6a): status flag that indicates the tcnt6a count operation. bit 4: ud6a description 0 free-running counter tcnt6a operates as an up-counter 1 free-running counter tcnt6a operates as a down-counter ? bit 3?cycle register compare-match flag 6d/7d (cmf6d/cmf7d): status flag that indicates cylrxd compare-match. bit 3: cmfxd description 0 [clearing condition] (initial value) when cmfxd is read while set to 1, then 0 is written to cmfxd 1 [setting conditions] ? when tcntxd = cylrxd (in non-complementary pwm mode) ? when tcnt6d = h'0000 in a down-count (in complementary pwm mode) x = 6 or 7 ? bit 2?cycle register compare-match flag 6c/7c (cmf6c/cmf7c): status flag that indicates cylrxc compare-match. bit 2: cmfxc description 0 [clearing condition] (initial value) when cmfxc is read while set to 1, then 0 is written to cmfxc 1 [setting conditions] ? when tcntxc = cylrxc (in non-complementary pwm mode) ? when tcnt6c = h'0000 in a down-count (in complementary pwm mode) x = 6 or 7
rev. 3.0, 09/04, page 277 of 1086 ? bit 1?cycle register compare-match flag 6b/7b (cmf6b/cmf7b): status flag that indicates cylrxb compare-match. bit 1: cmfxb description 0 [clearing condition] (initial value) when cmfxb is read while set to 1, then 0 is written to cmfxb 1 [setting conditions] ? when tcntxb = cylrxb (in non-complementary pwm mode) ? when tcnt6b = h'0000 in a down-count (in complementary pwm mode) x = 6 or 7 ? bit 0?cycle register compare-match flag 6a/7a (cmf6a/cmf7a): status flag that indicates cylrxa compare-match. bit 0: cmfxa description 0 [clearing condition] (initial value) when cmfxa is read while set to 1, then 0 is written to cmfxa 1 [setting conditions] ? when tcntxa = cylrxa (in non-complementary pwm mode) ? when tcnt6a = h'0000 in a down-count (in complementary pwm mode) x = 6 or 7 timer status register 8 (tsr8) tsr8 indicates the channel 8 one-shot pulse status. bit: 15 14 13 12 11 10 9 8 osf8p osf8o osf8n osf8m osf8l osf8k osf8j osf8i initial value: 0 0 0 0 0 0 0 0 r/w: r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * bit: 7 6 5 4 3 2 1 0 osf8h osf8g osf8f osf8e osf8d osf8c osf8b osf8a initial value: 0 0 0 0 0 0 0 0 r/w: r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * note: * only 0 can be written to clear the flag.
rev. 3.0, 09/04, page 278 of 1086 ? bit 15?one-shot pulse flag 8p (osf8p): status flag that indicates a dcnt8p one-shot pulse. bit 15: osf8p description 0 [clearing condition] (initial value) when osf8p is read while set to 1, then 0 is written to osf8p 1 [setting condition] when dcnt8p underflows ? bit 14?one-shot pulse flag 8o (osf8o): status flag that indicates a dcnt8o one-shot pulse. bit 14: osf8o description 0 [clearing condition] (initial value) when osf8o is read while set to 1, then 0 is written to osf8o 1 [setting condition] when dcnt8o underflows ? bit 13?one-shot pulse flag 8n (osf8n): status flag that indicates a dcnt8n one-shot pulse. bit 13: osf8n description 0 [clearing condition] (initial value) when osf8n is read while set to 1, then 0 is written to osf8n 1 [setting condition] when dcnt8n underflows ? bit 12?one-shot pulse flag 8m (osf8m): status flag that indicates a dcnt8m one-shot pulse. bit 12: osf8m description 0 [clearing condition] (initial value) when osf8m is read while set to 1, then 0 is written to osf8m 1 [setting condition] when dcnt8m underflows
rev. 3.0, 09/04, page 279 of 1086 ? bit 11?one-shot pulse flag 8l (osf8l): status flag that indicates a dcnt8l one-shot pulse. bit 11: osf8l description 0 [clearing condition] (initial value) when osf8l is read while set to 1, then 0 is written to osf8l 1 [setting condition] when dcnt8l underflows ? bit 10?one-shot pulse flag 8k (osf8k): status flag that indicates a dcnt8k one-shot pulse. bit 10: osf8k description 0 [clearing condition] (initial value) when osf8k is read while set to 1, then 0 is written to osf8k 1 [setting condition] when dcnt8k underflows ? bit 9?one-shot pulse flag 8j (osf8j): status flag that indicates a dcnt8j one-shot pulse. bit 9: osf8j description 0 [clearing condition] (initial value) when osf8j is read while set to 1, then 0 is written to osf8j 1 [setting condition] when dcnt8j underflows ? bit 8?one-shot pulse flag 8i (osf8i): status flag that indicates a dcnt8i one-shot pulse. bit 8: osf8i description 0 [clearing condition] (initial value) when osf8i is read while set to 1, then 0 is written to osf8i 1 [setting condition] when dcnt8i underflows
rev. 3.0, 09/04, page 280 of 1086 ? bit 7?one-shot pulse flag 8h (osf8h): status flag that indicates a dcnt8h one-shot pulse. bit 7: osf8h description 0 [clearing condition] (initial value) when osf8h is read while set to 1, then 0 is written to osf8h 1 [setting condition] when dcnt8h underflows ? bit 6?one-shot pulse flag 8g (osf8g): status flag that indicates a dcnt8g one-shot pulse. bit 6: osf8g description 0 [clearing condition] (initial value) when osf8g is read while set to 1, then 0 is written to osf8g 1 [setting condition] when dcnt8g underflows ? bit 5?one-shot pulse flag 8f (osf8f): status flag that indicates a dcnt8f one-shot pulse. bit 5: osf8f description 0 [clearing condition] (initial value) when osf8f is read while set to 1, then 0 is written to osf8f 1 [setting condition] when dcnt8f underflows ? bit 4?one-shot pulse flag 8e (osf8e): status flag that indicates a dcnt8e one-shot pulse. bit 4: osf8e description 0 [clearing condition] (initial value) when osf8e is read while set to 1, then 0 is written to osf8e 1 [setting condition] when dcnt8e underflows
rev. 3.0, 09/04, page 281 of 1086 ? bit 3?one-shot pulse flag 8d (osf8d): status flag that indicates a dcnt8d one-shot pulse. bit 3: osf8d description 0 [clearing condition] (initial value) when osf8d is read while set to 1, then 0 is written to osf8d 1 [setting condition] when dcnt8d underflows ? bit 2?one-shot pulse flag 8c (osf8c): status flag that indicates a dcnt8c one-shot pulse. bit 2: osf8c description 0 [clearing condition] (initial value) when osf8c is read while set to 1, then 0 is written to osf8c 1 [setting condition] when dcnt8c underflows ? bit 1?one-shot pulse flag 8b (osf8b): status flag that indicates a dcnt8b one-shot pulse. bit 1: osf8b description 0 [clearing condition] (initial value) when osf8b is read while set to 1, then 0 is written to osf8b 1 [setting condition] when dcnt8b underflows ? bit 0?one-shot pulse flag 8a (osf8a): status flag that indicates a dcnt8a one-shot pulse. bit 0: osf8a description 0 [clearing condition] (initial value) when osf8a is read while set to 1, then 0 is written to osf8a 1 [setting condition] when dcnt8a underflows
rev. 3.0, 09/04, page 282 of 1086 timer status register 9 (tsr9) tsr9 indicates the channel 9 event counter compare-match status. bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ? initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r bit: 7 6 5 4 3 2 1 0 ? ? cmf9f cmf9e cmf9d cmf9c cmf9b cmf9a initial value: 0 0 0 0 0 0 0 0 r/w: r r r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * note: * only 0 can be written to clear the flag. ? bits 15 to 6?reserved: these bits are always read as 0. the write value should always be 0. ? bit 5?compare-match flag 9f (cmf9f): status flag that indicates gr9f compare-match. bit 5: cmf9f description 0 [clearing condition] (initial value) when cmf9f is read while set to 1, then 0 is written to cmf9f 1 [setting condition] when the next edge is input while ecnt9f = gr9f ? bit 4?compare-match flag 9e (cmf9e): status flag that indicates gr9e compare-match. bit 4: cmf9e description 0 [clearing condition] (initial value) when cmf9e is read while set to 1, then 0 is written to cmf9e 1 [setting condition] when the next edge is input while ecnt9e = gr9e ? bit 3?compare-match flag 9d (cmf9d): status flag that indicates gr9d compare-match. bit 3: cmf9d description 0 [clearing condition] (initial value) when cmf9d is read while set to 1, then 0 is written to cmf9d 1 [setting condition] when the next edge is input while ecnt9d = gr9d
rev. 3.0, 09/04, page 283 of 1086 ? bit 2?compare-match flag 9c (cmf9c): status flag that indicates gr9c compare-match. bit 2: cmf9c description 0 [clearing condition] (initial value) when cmf9c is read while set to 1, then 0 is written to cmf9c 1 [setting condition] when the next edge is input while ecnt9c = gr9c ? bit 1?compare-match flag 9b (cmf9b): status flag that indicates gr9b compare-match. bit 1: cmf9b description 0 [clearing condition] (initial value) when cmf9b is read while set to 1, then 0 is written to cmf9b 1 [setting condition] when the next edge is input while ecnt9b = gr9b ? bit 0?compare-match flag 9a (cmf9a): status flag that indicates gr9a compare-match. bit 0: cmf9a description 0 [clearing condition] (initial value) when cmf9a is read while set to 1, then 0 is written to cmf9a 1 [setting condition] when the next edge is input while ecnt9a = gr9a
rev. 3.0, 09/04, page 284 of 1086 timer status register 11 (tsr11) tsr11 indicates the status of channel 11 input capture, compare-match, and overflow. bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ovf11 initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r/(w) * bit: 7 6 5 4 3 2 1 0 ? ? ? ? ? ? imf11b imf11a initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r/(w) * r/(w) * note: * only 0 can be written to clear the flag. ? bits 15 to 9?reserved: these bits are always read as 0. the write value should always be 0. ? bit 8?overflow flag 11 (ovf11): status flag that indicates tcnt11 overflow. bit 8: ovf11 description 0 [clearing condition] (initial value) when ovf11 is read while set to 1, then 0 is written to ovf11 1 [setting condition] when the tcnt11 value overflows (from h'ffff to h'0000) ? bits 7 to 2?reserved: these bits are always read as 0. the write value should always be 0. ? bit 1?input capture/compare-match flag 11b (imf11b): status flag that indicates gr11b input capture or compare-match. bit 1: imf11b description 0 [clearing condition] (initial value) when imf11b is read while set to 1, then 0 is written to imf11b 1 [setting conditions] ? when the tcnt11 value is transferred to gr11b by an input capture signal while gr11b is functioning as an input capture register ? when tcnt11 = gr11b while gr11b is functioning as an output compare register
rev. 3.0, 09/04, page 285 of 1086 ? bit 0?input capture/compare-match flag 11a (imf11a): status flag that indicates gr11a input capture or compare-match. bit 0: imf11a description 0 [clearing condition] (initial value) when imf11a is read while set to 1, then 0 is written to imf11a 1 [setting conditions] ? when the tcnt11 value is transferred to gr11a by an input capture signal while gr11a is functioning as an input capture register ? when tcnt11 = gr11a while gr11a is functioning as an output compare register 11.2.6 timer interrupt enable registers (tier) the timer interrupt enable registers (tier) are 16-bit registers. the atu-ii has 11 tier registers: one each for channels 0, 6 to 9, and 11, two each for channels 1 and 2, and one for channels 3 to 5. for details of channel 10, see section 11.2.26, channel 10 registers. channel abbreviation function 0 tier0 controls input capture, and overflow interrupt request enabling/disabling. 1 tier1a, tier1b 2 tier2a, tier2b control input capture, compare-match, and overflow interrupt request enabling/disabling. 3 4 5 tier3 controls input capture, compare-match, and overflow interrupt request enabling/disabling. 6 tier6 7 tier7 control cycle register compare-match interrupt request enabling/disabling. 8 tier8 controls down-counter output end (low) interrupt request enabling/disabling. 9 tier9 controls event counter compare-match interrupt request enabling/disabling. 11 tier11 controls input capture, compare-match, and overflow interrupt request enabling/disabling. the tier registers are 16-bit readable/writable registers that control enabling/disabling of free- running counter (tcnt) overflow interrupt requests, channel 0 input capture interrupt requests, channel 1 to 5 and 11 general register input capture/compare-match interrupt requests, channel 6 and 7 compare-match interrupt requests, channel 8 down-counter output end interrupt requests, and channel 9 event counter compare-match interrupt requests.
rev. 3.0, 09/04, page 286 of 1086 each tier is initialized to h'0000 by a power-on reset, and in hardware standby mode and software standby mode. timer interrupt enable register 0 (tier0) tier0 controls enabling/disabling of channel 0 input capture and overflow interrupt requests. bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ? initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r bit: 7 6 5 4 3 2 1 0 ? ? ? ove0 ice0d ice0c ice0b ice0a initial value: 0 0 0 0 0 0 0 0 r/w: r r r r/w r/w r/w r/w r/w ? bits 15 to 5?reserved: these bits are always read as 0. the write value should always be 0. ? bit 4?overflow interrupt enable 0 (ove0): enables or disables interrupt requests by the overflow flag (ovf0) in tsr0 when ovf0 is set to 1. bit 4: ove0 description 0 ovi0 interrupt requested by ovf0 is disabled (initial value) 1 ovi0 interrupt requested by ovf0 is enabled ? bit 3?input capture interrupt enable 0d (ice0d): enables or disables interrupt requests by the input capture flag (icf0d) in tsr0 when icf0d is set to 1. setting the dmac while interrupt requests are enabled allows the dmac to be activated by an interrupt request. bit 3: ice0d description 0 ici0d interrupt requested by icf0d is disabled (initial value) 1 ici0d interrupt requested by icf0d is enabled
rev. 3.0, 09/04, page 287 of 1086 ? bit 2?input capture interrupt enable 0c (ice0c): enables or disables interrupt requests by the input capture flag (icf0c) in tsr0 when icf0c is set to 1. setting the dmac while interrupt requests are enabled allows the dmac to be activated by an interrupt request. bit 2: ice0c description 0 ici0c interrupt requested by icf0c is disabled (initial value) 1 ici0c interrupt requested by icf0c is enabled ? bit 1?input capture interrupt enable 0b (ice0b): enables or disables interrupt requests by the input capture flag (icf0b) in tsr0 when icf0b is set to 1. setting the dmac while interrupt requests are enabled allows the dmac to be activated by an interrupt request. bit 1: ice0b description 0 ici0b interrupt requested by icf0b is disabled (initial value) 1 ici0b interrupt requested by icf0b is enabled ? bit 0?input capture interrupt enable 0a (ice0a): enables or disables interrupt requests by the input capture flag (icf0a) in tsr0 when icf0a is set to 1. setting the dmac while interrupt requests are enabled allows the dmac to be activated by an interrupt request. bit 0: ice0a description 0 ici0a interrupt requested by icf0a is disabled (initial value) 1 ici0a interrupt requested by icf0a is enabled timer interrupt enable registers 1a and 1b (tier1a, tier1b) tier1a: tier1a controls enabling/disabling of channel 1 input capture, compare-match, and overflow interrupt requests. bit: 15 14 13 12 11 10 9 8 bit name: ? ? ? ? ? ? ? ove1a initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r/w bit: 7 6 5 4 3 2 1 0 bit name: ime1h ime1g ime1f ime1e ime1d ime1c ime1b ime1a initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w
rev. 3.0, 09/04, page 288 of 1086 ? bits 15 to 9?reserved: these bits are always read as 0. the write value should always be 0. ? bit 8?overflow interrupt enable 1a (ove1a): enables or disables interrupt requests by ovf1a in tsr1a when ovf1a is set to 1. bit 8: ove1a description 0 ovi1a interrupt requested by ovf1a is disabled (initial value) 1 ovi1a interrupt requested by ovf1a is enabled ? bit 7?input capture/compare-match interrupt enable 1h (ime1h): enables or disables interrupt requests by imf1h in tsr1a when imf1h is set to 1. bit 7: ime1h description 0 imi1h interrupt requested by imf1h is disabled (initial value) 1 imi1h interrupt requested by imf1h is enabled ? bit 6?input capture/compare-match interrupt enable 1g (ime1g): enables or disables interrupt requests by imf1g in tsr1a when imf1g is set to 1. bit 6: ime1g description 0 imi1g interrupt requested by imf1g is disabled (initial value) 1 imi1g interrupt requested by imf1g is enabled ? bit 5?input capture/compare-match interrupt enable 1f (ime1f): enables or disables interrupt requests by imf1f in tsr1a when imf1f is set to 1. bit 5: ime1f description 0 imi1f interrupt requested by imf1f is disabled (initial value) 1 imi1f interrupt requested by imf1f is enabled ? bit 4?input capture/compare-match interrupt enable 1e (ime1e): enables or disables interrupt requests by imf1e in tsr1a when imf1e is set to 1. bit 4: ime1e description 0 imi1e interrupt requested by imf1e is disabled (initial value) 1 imi1e interrupt requested by imf1e is enabled
rev. 3.0, 09/04, page 289 of 1086 ? bit 3?input capture/compare-match interrupt enable 1d (ime1d): enables or disables interrupt requests by imf1d in tsr1a when imf1d is set to 1. bit 3: ime1d description 0 imi1d interrupt requested by imf1d is disabled (initial value) 1 imi1d interrupt requested by imf1d is enabled ? bit 2?input capture/compare-match interrupt enable 1c (ime1c): enables or disables interrupt requests by imf1c in tsr1a when imf1c is set to 1. bit 2: ime1c description 0 imi1c interrupt requested by imf1c is disabled (initial value) 1 imi1c interrupt requested by imf1c is enabled ? bit 1?input capture/compare-match interrupt enable 1b (ime1b): enables or disables interrupt requests by imf1b in tsr1a when imf1b is set to 1. bit 1: ime1b description 0 imi1b interrupt requested by imf1b is disabled (initial value) 1 imi1b interrupt requested by imf1b is enabled ? bit 0?input capture/compare-match interrupt enable 1a (ime1a): enables or disables interrupt requests by imf1a in tsr1a when imf1a is set to 1. bit 0: ime1a description 0 imi1a interrupt requested by imf1a is disabled (initial value) 1 imi1a interrupt requested by imf1a is enabled
rev. 3.0, 09/04, page 290 of 1086 tier1b: tier1b controls enabling/disabling of channel 1 compare-match and overflow interrupt requests. bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ove1b initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r/w bit: 7 6 5 4 3 2 1 0 ? ? ? ? ? ? ? cme1 initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r/w ? bits 15 to 9?reserved: these bits are always read as 0. the write value should always be 0. ? bit 8?overflow interrupt enable 1b (ove1b): enables or disables interrupt requests by ovf1b in tsr1b when ovf1b is set to 1. bit 8: ove1b description 0 ovi1b interrupt requested by ovf1b is disabled (initial value) 1 ovi1b interrupt requested by ovf1b is enabled ? bits 7 to 1?reserved: these bits are always read as 0. the write value should always be 0. ? bit 0?compare-match interrupt enable 1 (cme1): enables or disables interrupt requests by cmf1 in tsr1b when cmf1 is set to 1. bit 0: cme1 description 0 cmi1 interrupt requested by cmf1 is disabled (initial value) 1 cmi1 interrupt requested by cmf1 is enabled
rev. 3.0, 09/04, page 291 of 1086 timer interrupt enable registers 2a and 2b (tier2a, tier2b) tier2a: tier2a controls enabling/disabling of channel 2 input capture, compare-match, and overflow interrupt requests. bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ove2a initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r/w bit: 7 6 5 4 3 2 1 0 ime2h ime2g ime2f ime2e ime2d ime2c ime2b ime2a initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w ? bits 15 to 9?reserved: these bits are always read as 0. the write value should always be 0. ? bit 8?overflow interrupt enable 2a (ove2a): enables or disables interrupt requests by ovf2a in tsr2a when ovf2a is set to 1. bit 8: ove2a description 0 ovi2a interrupt requested by ovf2a is disabled (initial value) 1 ovi2a interrupt requested by ovf2a is enabled ? bit 7?input capture/compare-match interrupt enable 2h (ime2h): enables or disables interrupt requests by imf2h in tsr2a when imf2h is set to 1. bit 7: ime2h description 0 imi2h interrupt requested by imf2h is disabled (initial value) 1 imi2h interrupt requested by imf2h is enabled ? bit 6?input capture/compare-match interrupt enable 2g (ime2g): enables or disables interrupt requests by imf2g in tsr2a when imf2g is set to 1. bit 6: ime2g description 0 imi2g interrupt requested by imf2g is disabled (initial value) 1 imi2g interrupt requested by imf2g is enabled
rev. 3.0, 09/04, page 292 of 1086 ? bit 5?input capture/compare-match interrupt enable 2f (ime2f): enables or disables interrupt requests by imf2f in tsr2a when imf2f is set to 1. bit 5: ime2f description 0 imi2f interrupt requested by imf2f is disabled (initial value) 1 imi2f interrupt requested by imf2f is enabled ? bit 4?input capture/compare-match interrupt enable 2e (ime2e): enables or disables interrupt requests by imf2e in tsr2a when imf2e is set to 1. bit 4: ime2e description 0 imi2e interrupt requested by imf2e is disabled (initial value) 1 imi2e interrupt requested by imf2e is enabled ? bit 3?input capture/compare-match interrupt enable 2d (ime2d): enables or disables interrupt requests by imf2d in tsr2a when imf2d is set to 1. bit 3: ime2d description 0 imi2d interrupt requested by imf2d is disabled (initial value) 1 imi2d interrupt requested by imf2d is enabled ? bit 2?input capture/compare-match interrupt enable 2c (ime2c): enables or disables interrupt requests by imf2c in tsr2a when imf2c is set to 1. bit 2: ime2c description 0 imi2c interrupt requested by imf2c is disabled (initial value) 1 imi2c interrupt requested by imf2c is enabled ? bit 1?input capture/compare-match interrupt enable 2b (ime2b): enables or disables interrupt requests by imf2b in tsr2a when imf2b is set to 1. bit 1: ime2b description 0 imi2b interrupt requested by imf2b is disabled (initial value) 1 imi2b interrupt requested by imf2b is enabled
rev. 3.0, 09/04, page 293 of 1086 ? bit 0?input capture/compare-match interrupt enable 2a (ime2a): enables or disables interrupt requests by imf2a in tsr2a when imf2a is set to 1. bit 0: ime2a description 0 imi2a interrupt requested by imf2a is disabled (initial value) 1 imi2a interrupt requested by imf2a is enabled tier2b: tier2b controls enabling/disabling of channel 2 compare-match and overflow interrupt requests. bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ove2b initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r/w bit: 7 6 5 4 3 2 1 0 cme2h cme2g cme2f cme2e cme2d cme2c cme2b cme2a initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w ? bits 15 to 9?reserved: these bits are always read as 0. the write value should always be 0. ? bit 8?overflow interrupt enable 2b (ove2b): enables or disables interrupt requests by ovf2b in tsr2b when ovf2b is set to 1. bit 8: ove2b description 0 ovi2b interrupt requested by ovf2b is disabled (initial value) 1 ovi2b interrupt requested by ovf2b is enabled ? bit 7?compare-match interrupt enable 2h (cme2h): enables or disables interrupt requests by cmf2f in tsr2b when cmf2h is set to 1. bit 7: cme2h description 0 cmi2h interrupt requested by cmf2h is disabled (initial value) 1 cmi2h interrupt requested by cmf2h is enabled
rev. 3.0, 09/04, page 294 of 1086 ? bit 6?compare-match interrupt enable 2g (cme2g): enables or disables interrupt requests by cmf2g in tsr2b when cmf2g is set to 1. bit 6: cme2g description 0 cmi2g interrupt requested by cmf2g is disabled (initial value) 1 cmi2g interrupt requested by cmf2g is enabled ? bit 5?compare-match interrupt enable 2f (cme2f): enables or disables interrupt requests by cmf2f in tsr2b when cmf2f is set to 1. bit 5: cme2f description 0 cmi2f interrupt requested by cmf2f is disabled (initial value) 1 cmi2f interrupt requested by cmf2f is enabled ? bit 4?compare-match interrupt enable 2e (cme2e): enables or disables interrupt requests by cmf2e in tsr2b when cmf2e is set to 1. bit 4: cme2e description 0 cmi2e interrupt requested by cmf2e is disabled (initial value) 1 cmi2e interrupt requested by cmf2e is enabled ? bit 3?compare-match interrupt enable 2d (cme2d): enables or disables interrupt requests by cmf2d in tsr2b when cmf2d is set to 1. bit 3: cme2d description 0 cmi2d interrupt requested by cmf2d is disabled (initial value) 1 cmi2d interrupt requested by cmf2d is enabled ? bit 2?compare-match interrupt enable 2c (cme2c): enables or disables interrupt requests by cmf2c in tsr2b when cmf2c is set to 1. bit 2: cme2c description 0 cmi2c interrupt requested by cmf2c is disabled (initial value) 1 cmi2c interrupt requested by cmf2c is enabled
rev. 3.0, 09/04, page 295 of 1086 ? bit 1?compare-match interrupt enable 2b (cme2bb): enables or disables interrupt requests by cmf2b in tsr2b when cmf2b is set to 1. bit 1: cme2b description 0 cmi2b interrupt requested by cmf2b is disabled (initial value) 1 cmi2b interrupt requested by cmf2b is enabled ? bit 0?compare-match interrupt enable 2a (cme2a): enables or disables interrupt requests by cmf2a in tsr2b when cmf2a is set to 1. bit 0: cme2a description 0 cmi2a interrupt requested by cmf2a is disabled (initial value) 1 cmi2a interrupt requested by cmf2a is enabled timer interrupt enable register 3 (tier3) tier3 controls enabling/disabling of channel 3 to 5 input capture, compare-match, and overflow interrupt requests. bit: 15 14 13 12 11 10 9 8 ? ove5 ime5d ime5c ime5b ime5a ove4 ime4d initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r/w r/w r/w r/w r/w r/w bit: 7 6 5 4 3 2 1 0 ime4c ime4b ime4a ove3 ime3d ime3c ime3b ime3a initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w ? bit 15?reserved: this bit is always read as 0. the write value should always be 0. ? bit 14?overflow interrupt enable 5 (ove5): enables or disables interrupt requests by ovf5 in tsr3 when ovf5 is set to 1. bit 14: ove5 description 0 ovi5 interrupt requested by ovf5 is disabled (initial value) 1 ovi5 interrupt requested by ovf5 is enabled
rev. 3.0, 09/04, page 296 of 1086 ? bit 13?input capture/compare-match interrupt enable 5d (ime5d): enables or disables interrupt requests by imf5d in tsr3 when imf5d is set to 1. bit 13: ime5d description 0 imi5d interrupt requested by imf5d is disabled (initial value) 1 imi5d interrupt requested by imf5d is enabled ? bit 12?input capture/compare-match interrupt enable 5c (ime5c): enables or disables interrupt requests by imf5c in tsr3 when imf5c is set to 1. bit 12: ime5c description 0 imi5c interrupt requested by imf5c is disabled (initial value) 1 imi5c interrupt requested by imf5c is enabled ? bit 11?input capture/compare-match interrupt enable 5b (ime5b): enables or disables interrupt requests by imf5b in tsr3 when imf5b is set to 1. bit 11: ime5b description 0 imi5b interrupt requested by imf5b is disabled (initial value) 1 imi5b interrupt requested by imf5b is enabled ? bit 10?input capture/compare-match interrupt enable 5a (ime5a): enables or disables interrupt requests by imf5a in tsr3 when imf5a is set to 1. bit 10: ime5a description 0 imi5a interrupt requested by imf5a is disabled (initial value) 1 imi5a interrupt requested by imf5a is enabled ? bit 9?overflow interrupt enable 4 (ove4): enables or disables interrupt requests by ovf4 in tsr3 when ovf4 is set to 1. bit 9: ove4 description 0 ovi4 interrupt requested by ovf4 is disabled (initial value) 1 ovi4 interrupt requested by ovf4 is enabled
rev. 3.0, 09/04, page 297 of 1086 ? bit 8?input capture/compare-match interrupt enable 4d (ime4d): enables or disables interrupt requests by imf4d in tsr3 when imf4d is set to 1. bit 8: ime4d description 0 imi4d interrupt requested by imf4d is disabled (initial value) 1 imi4d interrupt requested by imf4d is enabled ? bit 7?input capture/compare-match interrupt enable 4c (ime4c): enables or disables interrupt requests by imf4c in tsr3 when imf4c is set to 1. bit 7: ime4c description 0 imi4c interrupt requested by imf4c is disabled (initial value) 1 imi4c interrupt requested by imf4c is enabled ? bit 6?input capture/compare-match interrupt enable 4b (ime4b): enables or disables interrupt requests by imf4b in tsr3 when imf4b is set to 1. bit 6: ime4b description 0 imi4b interrupt requested by imf4b is disabled (initial value) 1 imi4b interrupt requested by imf4b is enabled ? bit 5?input capture/compare-match interrupt enable 4a (ime4a): enables or disables interrupt requests by imf4a in tsr3 when imf4a is set to 1. bit 5: ime4a description 0 imi4a interrupt requested by imf4a is disabled (initial value) 1 imi4a interrupt requested by imf4a is enabled ? bit 4?overflow interrupt enable 3 (ove3): enables or disables interrupt requests by ovf3 in tsr3 when ovf3 is set to 1. bit 4: ove3 description 0 ovi3 interrupt requested by ovf3 is disabled (initial value) 1 ovi3 interrupt requested by ovf3 is enabled
rev. 3.0, 09/04, page 298 of 1086 ? bit 3?input capture/compare-match interrupt enable 3d (ime3d): enables or disables interrupt requests by imf3d in tsr3 when imf3d is set to 1. bit 3: ime3d description 0 imi3d interrupt requested by imf3d is disabled (initial value) 1 imi3d interrupt requested by imf3d is enabled ? bit 2?input capture/compare-match interrupt enable 3c (ime3c): enables or disables interrupt requests by imf3c in tsr3 when imf3c is set to 1. bit 2: ime3c description 0 imi3c interrupt requested by imf3c is disabled (initial value) 1 imi3c interrupt requested by imf3c is enabled ? bit 1?input capture/compare-match interrupt enable 3b (ime3b): enables or disables interrupt requests by imf3b in tsr3 when imf3b is set to 1. bit 1: ime3b description 0 imi3b interrupt requested by imf3b is disabled (initial value) 1 imi3b interrupt requested by imf3b is enabled ? bit 0?input capture/compare-match interrupt enable 3a (ime3a): enables or disables interrupt requests by imf3a in tsr3 when imf3a is set to 1. bit 0: ime3a description 0 imi3a interrupt requested by imf3a is disabled (initial value) 1 imi3a interrupt requested by imf3a is enabled
rev. 3.0, 09/04, page 299 of 1086 timer interrupt enable registers 6 and 7 (tier6, tier7) tier6 and tier7 control enabling/disabling of channel 6 and 7 cycle register compare interrupt requests. bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ? initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r bit: 7 6 5 4 3 2 1 0 ? ? ? ? cmexd cmexc cmexb cmexa initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r/w r/w r/w r/w x = 6 or 7 ? bits 15 to 4?reserved: these bits are always read as 0. the write value should always be 0. ? bit 3?cycle register compare-match interrupt enable 6d/7d (cme6d/cme7d): enables or disables interrupt requests by cmfxd in tsr6 or tsr7 when cmfxd is set to 1. setting the dmac while interrupt requests are enabled allows the dmac to be activated by an interrupt request. bit 3: cmexd description 0 cmixd interrupt requested by cmfxd is disabled (initial value) 1 cmixd interrupt requested by cmfxd is enabled x = 6 or 7 ? bit 2?cycle register compare-match interrupt enable 6c/7c (cme6c/cme7c): enables or disables interrupt requests by cmfxc in tsr6 or tsr7 when cmfxc is set to 1. setting the dmac while interrupt requests are enabled allows the dmac to be activated by an interrupt request. bit 2: cmexc description 0 cmixc interrupt requested by cmfxc is disabled (initial value) 1 cmixc interrupt requested by cmfxc is enabled x = 6 or 7
rev. 3.0, 09/04, page 300 of 1086 ? bit 1?cycle register compare-match interrupt enable 6b/7b (cme6b/cme7b): enables or disables interrupt requests by cmfxb in tsr6 or tsr7 when cmfxb is set to 1. setting the dmac while interrupt requests are enabled allows the dmac to be activated by an interrupt request. bit 1: cmexb description 0 cmixb interrupt requested by cmfxb is disabled (initial value) 1 cmixb interrupt requested by cmfxb is enabled x = 6 or 7 ? bit 0?cycle register compare-match interrupt enable 6a/7a (cme6a/cme7a): enables or disables interrupt requests by cmfxa in tsr6 or tsr7 when cmfxa is set to 1. setting the dmac while interrupt requests are enabled allows the dmac to be activated by an interrupt request. bit 0: cmexa description 0 cmixa interrupt requested by cmfxa is disabled (initial value) 1 cmixa interrupt requested by cmfxa is enabled x = 6 or 7 timer interrupt enable register 8 (tier8) tier8 controls enabling/disabling of channel 8 one-shot pulse interrupt requests. bit: 15 14 13 12 11 10 9 8 ose8p ose8o ose8n ose8m ose8l ose8k ose8j ose8i initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit: 7 6 5 4 3 2 1 0 ose8h ose8g ose8f ose8e ose8d ose8c ose8b ose8a initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w
rev. 3.0, 09/04, page 301 of 1086 ? bit 15?one-shot pulse interrupt enable 8p (ose8p): enables or disables interrupt requests by osf8p in tsr8 when osf8p is set to 1. bit 15: ose8p description 0 osi8p interrupt requested by osf8p is disabled (initial value) 1 osi8p interrupt requested by osf8p is enabled ? bit 14?one-shot pulse interrupt enable 8o (ose8o): enables or disables interrupt requests by osf8o in tsr8 when osf8o is set to 1. bit 14: ose8o description 0 osi8o interrupt requested by osf8o is disabled (initial value) 1 osi8o interrupt requested by osf8o is enabled ? bit 13?one-shot pulse interrupt enable 8n (ose8n): enables or disables interrupt requests by osf8n in tsr8 when osf8n is set to 1. bit 13: ose8n description 0 osi8n interrupt requested by osf8n is disabled (initial value) 1 osi8n interrupt requested by osf8n is enabled ? bit 12?one-shot pulse interrupt enable 8m (ose8m): enables or disables interrupt requests by osf8m in tsr8 when osf8m is set to 1. bit 12: ose8m description 0 osi8m interrupt requested by osf8m is disabled (initial value) 1 osi8m interrupt requested by osf8m is enabled ? bit 11?one-shot pulse interrupt enable 8l (ose8l): enables or disables interrupt requests by osf8l in tsr8 when osf8l is set to 1. bit 11: ose8l description 0 osi8l interrupt requested by osf8l is disabled (initial value) 1 osi8l interrupt requested by osf8l is enabled ? bit 10?one-shot pulse interrupt enable 8k (ose8k): enables or disables interrupt requests by osf8k in tsr8 when osf8k is set to 1.
rev. 3.0, 09/04, page 302 of 1086 bit 10: ose8k description 0 osi8k interrupt requested by osf8k is disabled (initial value) 1 osi8k interrupt requested by osf8k is enabled ? bit 9?one-shot pulse interrupt enable 8j (ose8j): enables or disables interrupt requests by osf8j in tsr8 when osf8j is set to 1. bit 9: ose8j description 0 osi8j interrupt requested by osf8j is disabled (initial value) 1 osi8j interrupt requested by osf8j is enabled ? bit 8?one-shot pulse interrupt enable 8i (ose8i): enables or disables interrupt requests by osf8i in tsr8 when osf8i is set to 1. bit 8: ose8i description 0 osi8i interrupt requested by osf8i is disabled (initial value) 1 osi8i interrupt requested by osf8i is enabled ? bit 7?one-shot pulse interrupt enable 8h (ose8h): enables or disables interrupt requests by osf8h in tsr8 when osf8h is set to 1. bit 7: ose8h description 0 osi8h interrupt requested by osf8h is disabled (initial value) 1 osi8h interrupt requested by osf8h is enabled ? bit 6?one-shot pulse interrupt enable 8g (ose8g): enables or disables interrupt requests by osf8g in tsr8 when osf8g is set to 1. bit 6: ose8g description 0 osi8g interrupt requested by osf8g is disabled (initial value) 1 osi8g interrupt requested by osf8g is enabled ? bit 5?one-shot pulse interrupt enable 8f (ose8f): enables or disables interrupt requests by osf8f in tsr8 when osf8f is set to 1. bit 5: ose8f description 0 osi8f interrupt requested by osf8f is disabled (initial value) 1 osi8f interrupt requested by osf8f is enabled
rev. 3.0, 09/04, page 303 of 1086 ? bit 4?one-shot pulse interrupt enable 8e (ose8e): enables or disables interrupt requests by osf8e in tsr8 when osf8e is set to 1. bit 4: ose8e description 0 osi8e interrupt requested by osf8e is disabled (initial value) 1 osi8e interrupt requested by osf8e is enabled ? bit 3?one-shot pulse interrupt enable 8d (ose8d): enables or disables interrupt requests by osf8d in tsr8 when osf8d is set to 1. bit 3: ose8d description 0 osi8d interrupt requested by osf8d is disabled (initial value) 1 osi8d interrupt requested by osf8d is enabled ? bit 2?one-shot pulse interrupt enable 8c (ose8c): enables or disables interrupt requests by osf8c in tsr8 when osf8c is set to 1. bit 2: ose8c description 0 osi8c interrupt requested by osf8c is disabled (initial value) 1 osi8c interrupt requested by osf8c is enabled ? bit 1?one-shot pulse interrupt enable 8b (ose8b): enables or disables interrupt requests by osf8b in tsr8 when osf8b is set to 1. bit 1: ose8b description 0 osi8b interrupt requested by osf8b is disabled (initial value) 1 osi8b interrupt requested by osf8b is enabled ? bit 0?one-shot pulse interrupt enable 8a (ose8a): enables or disables interrupt requests by osf8a in tsr8 when osf8a is set to 1. bit 0: ose8a description 0 osi8a interrupt requested by osf8a is disabled (initial value) 1 osi8a interrupt requested by osf8a is enabled
rev. 3.0, 09/04, page 304 of 1086 timer interrupt enable register 9 (tier9) tier9 controls enabling/disabling of channel 9 event counter compare-match interrupt requests. bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ? initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r bit: 7 6 5 4 3 2 1 0 ? ? cme9f cme9e cme9d cme9c cme9b cme9a initial value: 0 0 0 0 0 0 0 0 r/w: r r r/w r/w r/w r/w r/w r/w ? bits 15 to 6?reserved: these bits are always read as 0. the write value should always be 0. ? bit 5?compare-match interrupt enable 9f (cme9f): enables or disables interrupt requests by cmf9f in tsr9 when cmf9f is set to 1. bit 5: cme9f description 0 cmi9f interrupt requested by cmf9f is disabled (initial value) 1 cmi9f interrupt requested by cmf9f is enabled ? bit 4?compare-match interrupt enable 9e (cme9e): enables or disables interrupt requests by cmf9e in tsr9 when cmf9e is set to 1. bit 4: cme9e description 0 cmi9e interrupt requested by cmf9e is disabled (initial value) 1 cmi9e interrupt requested by cmf9e is enabled ? bit 3?compare-match interrupt enable 9d (cme9d): enables or disables interrupt requests by cmf9d in tsr9 when cmf9d is set to 1. bit 3: cme9d description 0 cmi9d interrupt requested by cmf9d is disabled (initial value) 1 cmi9d interrupt requested by cmf9d is enabled
rev. 3.0, 09/04, page 305 of 1086 ? bit 2?compare-match interrupt enable 9c (cme9c): enables or disables interrupt requests by cmf9c in tsr9 when cmf9c is set to 1. bit 2: cme9c description 0 cmi9c interrupt requested by cmf9c is disabled (initial value) 1 cmi9c interrupt requested by cmf9c is enabled ? bit 1?compare-match interrupt enable 9b (cme9b): enables or disables interrupt requests by cmf9b in tsr9 when cmf9b is set to 1. bit 1: cme9b description 0 cmi9b interrupt requested by cmf9b is disabled (initial value) 1 cmi9b interrupt requested by cmf9b is enabled ? bit 0?compare-match interrupt enable 9a (cme9a): enables or disables interrupt requests by cmf9a in tsr9 when cmf9a is set to 1. bit 0: cme9a description 0 cmi9a interrupt requested by cmf9a is disabled (initial value) 1 cmi9a interrupt requested by cmf9a is enabled timer interrupt enable register 11 (tier11) tier11 controls enabling/disabling of channel 11 input capture, compare-match, and overflow interrupt requests. bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ove11 initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r/w bit: 7 6 5 4 3 2 1 0 ? ? ? ? ? ? ime11b ime11a initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r/w r/w ? bits 15 to 9?reserved: these bits are always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 306 of 1086 ? bit 8?overflow interrupt enable 11 (ove11): enables or disables interrupt requests by ovf11 in tsr11 when ovf11 is set to 1. bit 8: ove11 description 0 ovi11 interrupt requested by ovf11 is disabled (initial value) 1 ovi11 interrupt requested by ovf11 is enabled ? bits 7 to 2?reserved: these bits are always read as 0. the write value should always be 0. ? bit 1?input capture/compare-match interrupt enable 11b (ime11b): enables or disables interrupt requests by imf11b in tsr11 when imf11b is set to 1. bit 1: ime11b description 0 imi11b interrupt requested by imf11b is disabled (initial value) 1 imi11b interrupt requested by imf11b is enabled ? bit 0?input capture/compare-match interrupt enable 11a (ime11a): enables or disables interrupt requests by imf11a in tsr11 when imf11a is set to 1. bit 0: ime11a description 0 imi11a interrupt requested by imf11a is disabled (initial value) 1 imi11a interrupt requested by imf11a is enabled 11.2.7 interval interrupt request registers (itvrr) the interval interrupt request registers (itvrr) are 8-bit registers. the atu-ii has three itvrr registers in channel 0. channel abbreviation function itvrr1 tcnt0 bit 6 to 9 interval interrupt generation and a/d2 converter activation itvrr2a tcnt0 bit 10 to 13 interval interrupt generation and a/d0 converter activation 0 itvrr2b tcnt0 bit 10 to 13 interval interrupt generation and a/d1 converter activation
rev. 3.0, 09/04, page 307 of 1086 interval interrupt request register 1 (itvrr1) bit: 7 6 5 4 3 2 1 0 itva9 itva8 itva7 itva6 itve9 itve8 itve7 itve6 initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w itvrr1 is an 8-bit readable/writable register that detects the rise of bits corresponding to the channel 0 free-running counter (tcnt0) and controls cyclic interrupt output and a/d2 converter activation. itvrr1 is initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode. ? bit 7?a/d2 converter interval activation bit 9 (itva9): a/d2 converter activation setting bit corresponding to bit 9 in tcnt0. the rise of bit 9 in tcnt0 is anded with itva9, and the result is output to the a/d2 converter as an activation signal. bit 7: itva9 description 0 a/d2 converter activation by rise of tcnt0 bit 9 is disabled (initial value) 1 a/d2 converter activation by rise of tcnt0 bit 9 is enabled ? bit 6?a/d2 converter interval activation bit 8 (itva8): a/d2 converter activation setting bit corresponding to bit 8 in tcnt0. the rise of bit 8 in tcnt0 is anded with itva8, and the result is output to the a/d2 converter as an activation signal. bit 6: itva8 description 0 a/d2 converter activation by rise of tcnt0 bit 8 is disabled (initial value) 1 a/d2 converter activation by rise of tcnt0 bit 8 is enabled ? bit 5?a/d2 converter interval activation bit 7 (itva7): a/d2 converter activation setting bit corresponding to bit 7 in tcnt0. the rise of bit 7 in tcnt0 is anded with itva7, and the result is output to the a/d2 converter as an activation signal. bit 5: itva7 description 0 a/d2 converter activation by rise of tcnt0 bit 7 is disabled (initial value) 1 a/d2 converter activation by rise of tcnt0 bit 7 is enabled
rev. 3.0, 09/04, page 308 of 1086 ? bit 4?a/d2 converter interval activation bit 6 (itva6): a/d2 converter activation setting bit corresponding to bit 6 in tcnt0. the rise of bit 6 in tcnt0 is anded with itva6, and the result is output to the a/d2 converter as an activation signal. bit 4: itva6 description 0 a/d2 converter activation by rise of tcnt0 bit 6 is disabled (initial value) 1 a/d2 converter activation by rise of tcnt0 bit 6 is enabled ? bit 3?interval interrupt bit 9 (itve9): intc interval interrupt setting bit corresponding to bit 9 in tcnt0. the rise of bit 9 in tcnt0 is anded with itve9, the result is stored in iif1 in tsr0, and an interrupt request is sent to the cpu. bit 3: itve9 description 0 interrupt request (itv1) by rise of tcnt0 bit 9 is disabled (initial value) 1 interrupt request (itv1) by rise of tcnt0 bit 9 is enabled ? bit 2?interval interrupt bit 8 (itve8): intc interval interrupt setting bit corresponding to bit 8 in tcnt0. the rise of bit 8 in tcnt0 is anded with itve8, the result is stored in iif1 in tsr0, and an interrupt request is sent to the cpu. bit 2: itve8 description 0 interrupt request (itv1) by rise of tcnt0 bit 8 is disabled (initial value) 1 interrupt request (itv1) by rise of tcnt0 bit 8 is enabled ? bit 1?interval interrupt bit 7 (itve7): intc interval interrupt setting bit corresponding to bit 7 in tcnt0. the rise of bit 7 in tcnt0 is anded with itve7, the result is stored in iif1 in tsr0, and an interrupt request is sent to the cpu. bit 1: itve7 description 0 interrupt request (itv1) by rise of tcnt0 bit 7 is disabled (initial value) 1 interrupt request (itv1) by rise of tcnt0 bit 7 is enabled ? bit 0?interval interrupt bit 6 (itve6): intc interval interrupt setting bit corresponding to bit 6 in tcnt0. the rise of bit 6 in tcnt0 is anded with itve6, the result is stored in iif1 in tsr0, and an interrupt request is sent to the cpu. bit 0: itve6 description 0 interrupt request (itv1) by rise of tcnt0 bit 6 is disabled (initial value) 1 interrupt request (itv1) by rise of tcnt0 bit 6 is enabled
rev. 3.0, 09/04, page 309 of 1086 interval interrupt request registers 2a and 2b (itvrr2a, itvrr2b) bit: 7 6 5 4 3 2 1 0 itva13x itva12x itva11x itva10x itve13x itve12x itve11x itve10x initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w x = a or b ? bit 7?a/d0 / a/d1 converter interval activation bit 13a/13b (itva13a/itva13b): a/d0 or a/d1 (itvrr2a: a/d0; itvrr2b: a/d1) converter activation setting bit corresponding to bit 13 in tcnt0. the rise of bit 13 in tcnt0 is anded with itva13x, and the result is output to the a/d0 or a/d1 converter as an activation signal. bit 7: itva13x description 0 a/d0 or a/d1 converter activation by rise of tcnt0 bit 13 is disabled (initial value) 1 a/d0 or a/d1 converter activation by rise of tcnt0 bit 13 is enabled x = a or b ? bit 6?a/d0 / a/d1 converter interval activation bit 12a/12b (itva12a/itva12b): a/d0 or a/d1 (itvrr2a: a/d0; itvrr2b: a/d1) converter activation setting bit corresponding to bit 12 in tcnt0. the rise of bit 12 in tcnt0 is anded with itva12x, and the result is output to the a/d0 or a/d1 converter as an activation signal. bit 6: itva12x description 0 a/d0 or a/d1 converter activation by rise of tcnt0 bit 12 is disabled (initial value) 1 a/d0 or a/d1 converter activation by rise of tcnt0 bit 12 is enabled x = a or b ? bit 5?a/d0 / a/d1 converter interval activation bit 11a/11b (itva11a/itva11b): a/d0 or a/d1 (itvrr2a: a/d0; itvrr2b: a/d1) converter activation setting bit corresponding to bit 11 in tcnt0. the rise of bit 11 in tcnt0 is anded with itva11x, and the result is output to the a/d0 or a/d1 converter as an activation signal. bit 5: itva11x description 0 a/d0 or a/d1 converter activation by rise of tcnt0 bit 11 is disabled (initial value) 1 a/d0 or a/d1 converter activation by rise of tcnt0 bit 11 is enabled x = a or b
rev. 3.0, 09/04, page 310 of 1086 ? bit 4?a/d0 / a/d1 converter interval activation bit 10a/10b (itva10a/itva10b): a/d0 or a/d1 (itvrr2a: a/d0; itvrr2b: a/d1) converter activation setting bit corresponding to bit 10 in tcnt0. the rise of bit 10 in tcnt0 is anded with itva10x, and the result is output to the a/d0 or a/d1 converter as an activation signal. bit 4: itva10x description 0 a/d0 or a/d1 converter activation by rise of tcnt0 bit 10 is disabled (initial value) 1 a/d0 or a/d1 converter activation by rise of tcnt0 bit 10 is enabled x = a or b ? bit 3?interval interrupt bit 13a/13b (itve13a/itve13b): intc interval interrupt setting bit corresponding to bit 13 in tcnt0. the rise of bit 13 in tcnt0 is anded with itve13x, the result is stored in iif2x in tsr0, and an interrupt request is sent to the cpu. bit 3: itve13x description 0 interrupt request (itv2x) by rise of tcnt0 bit 13 is disabled (initial value) 1 interrupt request (itv2x) by rise of tcnt0 bit 13 is enabled x = a or b ? bit 2?interval interrupt bit 12a/12b (itve12a/itve12b): intc interval interrupt setting bit corresponding to bit 12 in tcnt0. the rise of bit 12 in tcnt0 is anded with itve12x, the result is stored in iif2x in tsr0, and an interrupt request is sent to the cpu. bit 2: itve12x description 0 interrupt request (itv2x) by rise of tcnt0 bit 12 is disabled (initial value) 1 interrupt request (itv2x) by rise of tcnt0 bit 12 is enabled x = a or b ? bit 1?interval interrupt bit 11a/11b (itve11a/itve11b): intc interval interrupt setting bit corresponding to bit 11 in tcnt0. the rise of bit 11 in tcnt0 is anded with itve11x, the result is stored in iif2x in tsr0, and an interrupt request is sent to the cpu. bit 1: itve11x description 0 interrupt request (itv2x) by rise of tcnt0 bit 11 is disabled (initial value) 1 interrupt request (itv2x) by rise of tcnt0 bit 11 is enabled x = a or b
rev. 3.0, 09/04, page 311 of 1086 ? bit 0?interval interrupt bit 10 (itve10): intc interval interrupt setting bit corresponding to bit 10 in tcnt0. the rise of bit 10 in tcnt0 is anded with itve10x, the result is stored in iif2x in tsr0, and an interrupt request is sent to the cpu. bit 0: itve10x description 0 interrupt request (itv2x) by rise of tcnt0 bit 10 is disabled (initial value) 1 interrupt request (itv2x) by rise of tcnt0 bit 10 is enabled x = a or b for details, see section 11.3.7, interval timer operation. 11.2.8 trigger mode register (trgmdr) the trigger mode register (trgmdr) is an 8-bit register. the atu-ii has one trgmdr register. bit: 7 6 5 4 3 2 1 0 trgmd ? ? ? ? ? ? ? initial value: 0 0 0 0 0 0 0 0 r/w: r/w r r r r r r r trgmdr is an 8-bit readable/writable register that selects whether a channel 1 compare-match is used as a channel 8 one-shot pulse start trigger or as a one-shot pulse terminate trigger when channel 1 and channel 8 are used in combination. trgmdr is initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode. ? bit 7?trigger mode selection register (trgmd): selects the channel 8 one-shot pulse start trigger/one-shot pulse terminate trigger setting. bit 7: trgmd description 0 one-shot pulse start trigger (tcnt1b = ocr1) (initial value) one-shot pulse terminate trigger (tcnt1a = gr1a?gr1h) 1 one-shot pulse start trigger (tcnt1a = gr1a?gr1h) one-shot pulse terminate trigger (tcnt1b = ocr1) ? bits 6 to 0?reserved: these bits are always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 312 of 1086 11.2.9 timer mode register (tmdr) the timer mode register (tmdr) is an 8-bit register. the atu-ii has one tdr register. bit: 7 6 5 4 3 2 1 0 ? ? ? ? ? t5pwm t4pwm t3pwm initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r/w r/w r/w tmdr is an 8-bit readable/writable register that specifies whether channels 3 to 5 are used in input capture/output compare mode or pwm mode. tmdr is initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode. ? bits 7 to 3?reserved: these bits are always read as 0. the write value should always be 0. ? bit 2?pwm mode 5 (t5pwm): selects whether channel 5 operates in input capture/output compare mode or pwm mode. bit 2: t5pwm description 0 channel 5 operates in input capture/output compare mode (initial value) 1 channel 5 operates in pwm mode when bit t5pwm is set to 1 to select pwm mode, pins tio5a to tio5c become pwm output pins, general register 5d (gr5d) functions as a cycle register, and general registers 5a to 5c (gr5a to gr5c) function as duty registers. settings in the timer i/o control registers (tior5a, tior5b) are invalid, and general registers 5a to 5d (gr5a to gr5d) can be written to. do not use the tio5d pin as a timer output. ? bit 1?pwm mode 4 (t4pwm): selects whether channel 4 operates in input capture/output compare mode or pwm mode. bit 1: t4pwm description 0 channel 4 operates in input capture/output compare mode (initial value) 1 channel 4 operates in pwm mode when bit t4pwm is set to 1 to select pwm mode, pins tio4a to tio4c become pwm output pins, general register 4d (gr4d) functions as a cycle register, and general registers 4a to 4c (gr4a to gr4c) function as duty registers. settings in the timer i/o control registers (tior4a, tior4b) are invalid, and general registers 4a to 4d (gr4a to gr4d) can be written to. do not use the tio4d pin as a timer output.
rev. 3.0, 09/04, page 313 of 1086 ? bit 0?pwm mode 3 (t3pwm): selects whether channel 3 operates in input capture/output compare mode or pwm mode. bit 0: t3pwm description 0 channel 3 operates in input capture/output compare mode (initial value) 1 channel 3 operates in pwm mode when bit t3pwm is set to 1 to select pwm mode, pins tio3a to tio3c become pwm output pins, general register 3d (gr3d) functions as a cycle register, and general registers 3a to 3c (gr3a to gr3c) function as duty registers. settings in the timer i/o control registers (tior3a, tior3b) are invalid, and general registers 3a to 3d (gr3a to gr3d) can be written to. do not use the tio3d pin as a timer output. 11.2.10 pwm mode register (pmdr) the pwm mode register (pmdr) is an 8-bit register. the atu-ii has one pmdr register. bit: 7 6 5 4 3 2 1 0 dtseld dtselc dtselb dtsela cntseld cntselc cntselb cntsela initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w pmdr is an 8-bit readable/writable register that selects whether channel 6 pwm output is set to on-duty/off-duty, or to non-complementary pwm mode/complementary pwm mode. pmdr is initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode. ? bit 7?duty selection register d (dtseld): selects whether channel 6d to6d output pwm is set to on-duty or to off-duty. bit 7: dtseld description 0 to6d pwm output is on-duty (initial value) 1 to6d pwm output is off-duty
rev. 3.0, 09/04, page 314 of 1086 ? bit 6?duty selection register c (dtselc): selects whether channel 6c to6c output pwm is set to on-duty or to off-duty. bit 6: dtselc description 0 to6c pwm output is on-duty (initial value) 1 to6c pwm output is off-duty ? bit 5?duty selection register b (dtselb): selects whether channel 6b to6b output pwm is set to on-duty or to off-duty. bit 5: dtselb description 0 to6b pwm output is on-duty (initial value) 1 to6b pwm output is off-duty ? bit 4?duty selection register a (dtsela): selects whether channel 6a to6a output pwm is set to on-duty or to off-duty. bit 4: dtsela description 0 to6a pwm output is on-duty (initial value) 1 to6a pwm output is off-duty ? bit 3?counter selection register d (cntseld): selects whether channel 6d pwm is set to non-complementary pwm mode or to complementary pwm mode. bit 3: cntseld description 0 tcnt6d is set to non-complementary pwm mode (initial value) 1 tcnt6d is set to complementary pwm mode ? bit 2?counter selection register c (cntselc): selects whether channel 6c pwm is set to non-complementary pwm mode or to complementary pwm mode. bit 2: cntselc description 0 tcnt6c is set to non-complementary pwm mode (initial value) 1 tcnt6c is set to complementary pwm mode
rev. 3.0, 09/04, page 315 of 1086 ? bit 1?counter selection register b (cntselb): selects whether channel 6b pwm is set to non-complementary pwm mode or to complementary pwm mode. bit 1: cntselb description 0 tcnt6b is set to non-complementary pwm mode (initial value) 1 tcnt6b is set to complementary pwm mode ? bit 0?counter selection register a (cntsela): selects whether channel 6a pwm is set to non-complementary pwm mode or to complementary pwm mode. bit 0: cntsela description 0 tcnt6a is set to non-complementary pwm mode (initial value) 1 tcnt6a is set to complementary pwm mode 11.2.11 down-count start register (dstr) the down-count start register (dstr) is a 16-bit register. the atu-ii has one dstr register in channel 8. bit: 15 14 13 12 11 10 9 8 dst8p dst8o dst8n dst8m dst8l dst8k dst8j dst8i initial value: 0 0 0 0 0 0 0 0 r/w: r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * bit: 7 6 5 4 3 2 1 0 dst8h dst8g dst8f dst8e dst8d dst8c dst8b dst8a initial value: 0 0 0 0 0 0 0 0 r/w: r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * note: * only 1 can be written. dstr is a 16-bit readable/writable register that starts the channel 8 down-counter (dcnt). when the one-shot pulse function is used, a value of 1 can be set in a dst8x bit at any time by the user program, except when the corresponding dcnt8x value is h'0000. the dst8x bits are cleared to 0 automatically when the dcnt value overflows. when the offset one-shot pulse function is used, dst8x is automatically set to 1 (except when the dcnt8x value is h'0000) when a compare-match occurs between the channel 1 or 2 free-running counter (tcnt) and a general register (gr) or the output compare register (ocr1) while the corresponding timer connection register (tcnr) bit is set to 1. as regards dst8i to dst8p, if the
rev. 3.0, 09/04, page 316 of 1086 rlden bit in the reload enable register (rldenr) is set to 1 and the reload register (rldr8) value is not h'0000, a reload is performed into the corresponding dcnt8x, and the dst8x bit is set to 1. dst8x is automatically cleared to 0 when the dcnt8x vaue underflows, or by input of a channel 1 or 2 one-shot terminate trigger signal set in the trigger mode register (trgmdr) while the corresponding one-shot pulse terminate register (otr) bit is set to 1, whichever occurs first. dcnt8x is cleared to h'0000 when underflow occurs. dstr is initialized to h'0000 by a power-on reset, and in hardware standby mode and software standby mode. for details, see sections 11.3.5, one-shot pulse function, and 11.3.6, offset one-shot pulse function and output cutoff function. ? bit 15?down-count start 8p (dst8p): starts down-counter 8p (dcnt8p). bit 15: dst8p description 0 dcnt8p is halted (initial value) [clearing condition] when the dcnt8p value underflows, or on channel 2 (gr2h) compare- match 1 dcnt8p counts [setting conditions] ? one-shot pulse function: set by user program (dcnt8p h'0000) ? offset one-shot pulse function: set on ocr2h compare-match (dcnt8p h'0000 or reload possible) or by user program (dcnt8p h'0000) ? bit 14?down-count start 8o (dst8o): starts down-counter 8o (dcnt8o). bit 14: dst8o description 0 dcnt8o is halted (initial value) [clearing condition] when the dcnt8o value underflows, or on channel 2 (gr2g) compare- match 1 dcnt8o counts [setting conditions] ? one-shot pulse function: set by user program (dcnt8o h'0000) ? offset one-shot pulse function: set on ocr2g compare-match (dcnt8o h'0000 or reload possible) or by user program (dcnt8o h'0000)
rev. 3.0, 09/04, page 317 of 1086 ? bit 13?down-count start 8n (dst8n): starts down-counter 8n (dcnt8n). bit 13: dst8n description 0 dcnt8n is halted (initial value) [clearing condition] when the dcnt8n value underflows, or on channel 2 (gr2f) compare- match 1 dcnt8n counts [setting conditions] ? one-shot pulse function: set by user program (dcnt8n h'0000) ? offset one-shot pulse function: set on ocr2f compare-match (dcnt8n h'0000 or reload possible) or by user program (dcnt8n h'0000) ? bit 12?down-count start 8m (dst8m): starts down-counter 8m (dcnt8m). bit 12: dst8m description 0 dcnt8m is halted (initial value) [clearing condition] when the dcnt8m value underflows, or on channel 2 (gr2e) compare- match 1 dcnt8m counts [setting conditions] ? one-shot pulse function: set by user program (dcnt8m h'0000) ? offset one-shot pulse function: set on ocr2e compare-match (dcnt8m h'0000 or reload possible) or by user program (dcnt8m h'0000)
rev. 3.0, 09/04, page 318 of 1086 ? bit 11?down-count start 8l (dst8l): starts down-counter 8l (dcnt8l). bit 11: dst8l description 0 dcnt8l is halted (initial value) [clearing condition] when the dcnt8l value underflows, or on channel 2 (gr2d) compare- match 1 dcnt8l counts [setting conditions] ? one-shot pulse function: set by user program (dcnt8l h'0000) ? offset one-shot pulse function: set on ocr2d compare-match (dcnt8l h'0000 or reload possible) or by user program (dcnt8l h'0000) ? bit 10?down-count start 8k (dst8k): starts down-counter 8k (dcnt8k). bit 10: dst8k description 0 dcnt8k is halted (initial value) [clearing condition] when the dcnt8k value underflows, or on channel 2 (gr2c) compare- match 1 dcnt8k counts [setting conditions] ? one-shot pulse function: set by user program (dcnt8k h'0000) ? offset one-shot pulse function: set on ocr2c compare-match (dcnt8k h'0000 or reload possible) or by user program (dcnt8k h'0000) ? bit 9?down-count start 8j (dst8j): starts down-counter 8j (dcnt8j). bit 9: dst8j description 0 dcnt8j is halted (initial value) [clearing condition] when the dcnt8j value underflows, or on channel 2 (gr2b) compare- match 1 dcnt8j counts [setting conditions] ? one-shot pulse function: set by user program (dcnt8j h'0000) ? offset one-shot pulse function: set on ocr2b compare-match (dcnt8j h'0000 or reload possible) or by user program (dcnt8j h'0000)
rev. 3.0, 09/04, page 319 of 1086 ? bit 8?down-count start 8i (dst8i): starts down-counter 8i (dcnt8i). bit 8: dst8i description 0 dcnt8i is halted (initial value) [clearing condition] when the dcnt8i value underflows, or on channel 2 (gr2a) compare-match 1 dcnt8i counts [setting conditions] ? one-shot pulse function: set by user program (dcnt8i h'0000) ? offset one-shot pulse function: set on ocr2a compare-match (dcnt8i h'0000 or reload possible) or by user program (dcnt8i h'0000) ? bit 7?down-count start 8h (dst8h): starts down-counter 8h (dcnt8h). bit 7: dst8h description 0 dcnt8h is halted (initial value) [clearing condition] when the dcnt8h value underflows, or on channel 1 (gr1h or ocr1) compare-match 1 dcnt8h counts [setting conditions] ? one-shot pulse function: set by user program (dcnt8h h'0000) ? offset one-shot pulse function: set on ocr1 compare-match or gr1h compare-match, or by user program (dcnt8h h'0000) ? bit 6?down-count start 8g (dst8g): starts down-counter 8g (dcnt8g). bit 6: dst8g description 0 dcnt8g is halted (initial value) [clearing condition] when the dcnt8g value underflows, or on channel 1 (gr1g or ocr1) compare-match 1 dcnt8g counts [setting conditions] ? one-shot pulse function: set by user program (dcnt8g h'0000) ? offset one-shot pulse function: set on ocr1 compare-match or gr1g compare-match, or by user program (dcnt8g h'0000)
rev. 3.0, 09/04, page 320 of 1086 ? bit 5?down-count start 8f (dst8f): starts down-counter 8f (dcnt8f). bit 5: dst8f description 0 dcnt8f is halted (initial value) [clearing condition] when the dcnt8f value underflows, or on channel 1 (gr1f or ocr1) compare-match 1 dcnt8f counts [setting conditions] ? one-shot pulse function: set by user program (dcnt8f h'0000) ? offset one-shot pulse function: set on ocr1 compare-match or gr1f compare-match, or by user program (dcnt8f h'0000) ? bit 4?down-count start 8e (dst8e): starts down-counter 8e (dcnt8e). bit 4: dst8e description 0 dcnt8e is halted (initial value) [clearing condition] when the dcnt8e value underflows, or on channel 1 (gr1e or ocr1) compare-match 1 dcnt8e counts [setting conditions] ? one-shot pulse function: set by user program (dcnt8e h'0000) ? offset one-shot pulse function: set on ocr1 compare-match or gr1e compare-match, or by user program (dcnt8e h'0000) ? bit 3?down-count start 8d (dst8d): starts down-counter 8d (dcnt8d). bit 3: dst8d description 0 dcnt8d is halted (initial value) [clearing condition] when the dcnt8d value underflows, or on channel 1 (gr1d or ocr1) compare-match 1 dcnt8d counts [setting conditions] ? one-shot pulse function: set by user program (dcnt8d h'0000) ? offset one-shot pulse function: set on ocr1 compare-match or gr1d compare-match, or by user program (dcnt8d h'0000)
rev. 3.0, 09/04, page 321 of 1086 ? bit 2?down-count start 8c (dst8c): starts down-counter 8c (dcnt8c). bit 2: dst8c description 0 dcnt8c is halted (initial value) [clearing condition] when the dcnt8c value underflows, or on channel 1 (gr1c or ocr1) compare-match 1 dcnt8c counts [setting conditions] ? one-shot pulse function: set by user program (dcnt8c h'0000) ? offset one-shot pulse function: set on ocr1 compare-match or gr1c compare-match, or by user program (dcnt8c h'0000) ? bit 1?down-count start 8b (dst8b): starts down-counter 8b (dcnt8b). bit 1: dst8b description 0 dcnt8b is halted (initial value) [clearing condition] when the dcnt8b value underflows, or on channel 1 (gr1b or ocr1) compare-match 1 dcnt8b counts [setting conditions] ? one-shot pulse function: set by user program (dcnt8b h'0000) ? offset one-shot pulse function: set on ocr1 compare-match or gr1b compare-match, or by user program (dcnt8b h'0000) ? bit 0?down-count start 8a (dst8a): starts down-counter 8a (dcnt8a). bit 0: dst8a description 0 dcnt8a is halted (initial value) [clearing condition] when the dcnt8a value underflows, or on channel 1 (gr1a or ocr1) compare-match 1 dcnt8a counts [setting conditions] ? one-shot pulse function: set by user program (dcnt8a h'0000) ? offset one-shot pulse function: set on ocr1 compare-match or gr1a compare-match, or by user program (dcnt8a h'0000)
rev. 3.0, 09/04, page 322 of 1086 11.2.12 timer connection register (tcnr) the timer connection register (tcnr) is a 16-bit register. the atu-ii has one tcnr register in channel 8. bit: 15 14 13 12 11 10 9 8 cn8p cn8o cn8n cn8m cn8l cn8k cn8j cn8i initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit: 7 6 5 4 3 2 1 0 cn8h cn8g cn8f cn8e cn8d cn8c cn8b cn8a initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w tcnr is a 16-bit readable/writable register that enables or disables connection between the channel 8 down-count start register (dstr) and channel 1 and 2 compare-match signals (down- count start triggers). channel 1 down-count start triggers a to h are channel 1 ocr1 compare- match signals or gr1x compare-match signals (set in trgmdr). channel 2 down-count start triggers a to h are channel 2 ocr2x compare-match signals. when gr1x compare-matches are used, set tior1a to tior1d to allow compare-matches. tcnr is initialized to h'0000 by a power-on reset, and in hardware standby mode and software standby mode. for details, see sections 11.3.5, one-shot pulse function, and 11.3.6, offset one-shot pulse function and output cutoff function. ? bit 15?connection flag 8p (cn8p): enables or disables connection between dst8p and the channel 2 down-count start trigger. bit 15: cn8p description 0 connection between dst8p and channel 2 down-count start trigger h is disabled (initial value) 1 connection between dst8p and channel 2 down-count start trigger h is enabled
rev. 3.0, 09/04, page 323 of 1086 ? bit 14?connection flag 8o (cn8o): enables or disables connection between dst8o and the channel 2 down-count start trigger. bit 14: cn8o description 0 connection between dst8o and channel 2 down-count start trigger g is disabled (initial value) 1 connection between dst8o and channel 2 down-count start trigger g is enabled ? bit 13?connection flag 8n (cn8n): enables or disables connection between dst8n and the channel 2 down-count start trigger. bit 13: cn8n description 0 connection between dst8n and channel 2 down-count start trigger f is disabled (initial value) 1 connection between dst8n and channel 2 down-count start trigger f is enabled ? bit 12?connection flag 8m (cn8m): enables or disables connection between dst8m and the channel 2 down-count start trigger. bit 12: cn8m description 0 connection between dst8m and channel 2 down-count start trigger e is disabled (initial value) 1 connection between dst8m and channel 2 down-count start trigger e is enabled ? bit 11?connection flag 8l (cn8l): enables or disables connection between dst8l and the channel 2 down-count start trigger. bit 11: cn8l description 0 connection between dst8l and channel 2 down-count start trigger d is disabled (initial value) 1 connection between dst8l and channel 2 down-count start trigger d is enabled
rev. 3.0, 09/04, page 324 of 1086 ? bit 10?connection flag 8k (cn8k): enables or disables connection between dst8k and the channel 2 down-count start trigger. bit 10: cn8k description 0 connection between dst8k and channel 2 down-count start trigger c is disabled (initial value) 1 connection between dst8k and channel 2 down-count start trigger c is enabled ? bit 9?connection flag 8j (cn8j): enables or disables connection between dst8j and the channel 2 down-count start trigger. bit 9: cn8j description 0 connection between dst8j and channel 2 down-count start trigger b is disabled (initial value) 1 connection between dst8j and channel 2 down-count start trigger b is enabled ? bit 8?connection flag 8i (cn8i): enables or disables connection between dst8i and the channel 2 down-count start trigger. bit 8: cn8i description 0 connection between dst8i and channel 2 down-count start trigger a is disabled (initial value) 1 connection between dst8i and channel 2 down-count start trigger a is enabled ? bit 7?connection flag 8h (cn8h): enables or disables connection between dst8h and the channel 1 down-count start trigger. bit 7: cn8h description 0 connection between dst8h and channel 1 down-count start trigger h is disabled (initial value) 1 connection between dst8h and channel 1 down-count start trigger h is enabled
rev. 3.0, 09/04, page 325 of 1086 ? bit 6?connection flag 8g (cn8g): enables or disables connection between dst8g and the channel 1 down-count start trigger. bit 6: cn8g description 0 connection between dst8g and channel 1 down-count start trigger g is disabled (initial value) 1 connection between dst8g and channel 1 down-count start trigger g is enabled ? bit 5?connection flag 8f (cn8f): enables or disables connection between dst8f and the channel 1 down-count start trigger. bit 5: cn8f description 0 connection between dst8f and channel 1 down-count start trigger f is disabled (initial value) 1 connection between dst8f and channel 1 down-count start trigger f is enabled ? bit 4?connection flag 8e (cn8e): enables or disables connection between dst8e and the channel 1 down-count start trigger. bit 4: cn8e description 0 connection between dst8e and channel 1 down-count start trigger e is disabled (initial value) 1 connection between dst8e and channel 1 down-count start trigger e is enabled ? bit 3?connection flag 8d (cn8d): enables or disables connection between dst8d and the channel 1 down-count start trigger. bit 3: cn8d description 0 connection between dst8d and channel 1 down-count start trigger d is disabled (initial value) 1 connection between dst8d and channel 1 down-count start trigger d is enabled
rev. 3.0, 09/04, page 326 of 1086 ? bit 2?connection flag 8c (cn8c): enables or disables connection between dst8c and the channel 1 down-count start trigger. bit 2: cn8c description 0 connection between dst8c and channel 1 down-count start trigger c is disabled (initial value) 1 connection between dst8c and channel 1 down-count start trigger c is enabled ? bit 1?connection flag 8b (cn8b): enables or disables connection between dst8b and the channel 1 down-count start trigger. bit 1: cn8b description 0 connection between dst8b and channel 1 down-count start trigger b is disabled (initial value) 1 connection between dst8b and channel 1 down-count start trigger b is enabled ? bit 0?connection flag 8a (cn8a): enables or disables connection between dst8a and the channel 1 down-count start trigger. bit 0: cn8a description 0 connection between dst8a and channel 1 down-count start trigger a is disabled (initial value) 1 connection between dst8a and channel 1 down-count start trigger a is enabled
rev. 3.0, 09/04, page 327 of 1086 11.2.13 one-shot pulse terminate register (otr) the one-shot pulse terminate register (otr) is a 16-bit register. the atu-ii has one otr register in channel 8. bit: 15 14 13 12 11 10 9 8 otep oteo oten otem otel otek otej otei initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit: 7 6 5 4 3 2 1 0 oteh oteg otef otee oted otec oteb otea initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w otr is a 16-bit readable/writable register that enables or disables forced termination of channel 8 one-shot pulse output by channel 1 and 2 compare-match signals. when one-shot pulse output is forcibly terminated, the corresponding dstr bit and down-counter are cleared, and the corresponding tsr8 bit is set. the channel 1 one-shot pulse terminate signal is generated by gr1a to gr1h compare-matches and ocr1 compare-match (see trgmdr). the channel 2 one-shot pulse terminate signal is generated by gr2a to gr2h compare-matches. to generate the terminate signal with gr1a to gr1h and gr2a to gr2h, select the respective compare-matches in tior1a to tior1d. otr is initialized to h'0000 by a power-on reset, and in hardware standby mode and software standby mode. ? bit 15?one-shot pulse terminate enable p (otep): enables or disables forced termination of output by channel 2 down-counter terminate trigger h. bit 15: otep description 0 forced termination of to8p by down-counter terminate trigger is disabled (initial value) 1 forced termination of to8p by down-counter terminate trigger is enabled
rev. 3.0, 09/04, page 328 of 1086 ? bit 14?one-shot pulse terminate enable o (oteo): enables or disables forced termination of output by channel 2 down-counter terminate trigger g. bit 14: oteo description 0 forced termination of to8o by down-counter terminate trigger is disabled (initial value) 1 forced termination of to8o by down-counter terminate trigger is enabled ? bit 13?one-shot pulse terminate enable n (oten): enables or disables forced termination of output by channel 2 down-counter terminate trigger f. bit 13: oten description 0 forced termination of to8n by down-counter terminate trigger is disabled (initial value) 1 forced termination of to8n by down-counter terminate trigger is enabled ? bit 12?one-shot pulse terminate enable m (otem): enables or disables forced termination of output by channel 2 down-counter terminate trigger e. bit 12: otem description 0 forced termination of to8m by down-counter terminate trigger is disabled (initial value) 1 forced termination of to8m by down-counter terminate trigger is enabled ? bit 11?one-shot pulse terminate enable l (otel): enables or disables forced termination of output by channel 2 down-counter terminate trigger d. bit 11: otel description 0 forced termination of to8l by down-counter terminate trigger is disabled (initial value) 1 forced termination of to8l by down-counter terminate trigger is enabled ? bit 10?one-shot pulse terminate enable k (otek): enables or disables forced termination of output by channel 2 down-counter terminate trigger c. bit 10: otek description 0 forced termination of to8k by down-counter terminate trigger is disabled (initial value) 1 forced termination of to8k by down-counter terminate trigger is enabled
rev. 3.0, 09/04, page 329 of 1086 ? bit 9?one-shot pulse terminate enable j (otej): enables or disables forced termination of output by channel 2 down-counter terminate trigger b. bit 9: otej description 0 forced termination of to8j by down-counter terminate trigger is disabled (initial value) 1 forced termination of to8j by down-counter terminate trigger is enabled ? bit 8?one-shot pulse terminate enable i (otei): enables or disables forced termination of output by channel 2 down-counter terminate trigger a. bit 8: otei description 0 forced termination of to8i by down-counter terminate trigger is disabled (initial value) 1 forced termination of to8i by down-counter terminate trigger is enabled ? bit 7?one-shot pulse terminate enable h (oteh): enables or disables forced termination of output by channel 1 down-counter terminate trigger h. bit 7: oteh description 0 forced termination of to8h by down-counter terminate trigger is disabled (initial value) 1 forced termination of to8h by down-counter terminate trigger is enabled ? bit 6?one-shot pulse terminate enable g (oteg): enables or disables forced termination of output by channel 1 down-counter terminate trigger g. bit 6: oteg description 0 forced termination of to8g by down-counter terminate trigger is disabled (initial value) 1 forced termination of to8g by down-counter terminate trigger is enabled ? bit 5?one-shot pulse terminate enable f (otef): enables or disables forced termination of output by channel 1 down-counter terminate trigger f. bit 5: otef description 0 forced termination of to8f by down-counter terminate trigger is disabled (initial value) 1 forced termination of to8f by down-counter terminate trigger is enabled
rev. 3.0, 09/04, page 330 of 1086 ? bit 4?one-shot pulse terminate enable e (otee): enables or disables forced termination of output by channel 1 down-counter terminate trigger e. bit 4: otee description 0 forced termination of to8e by down-counter terminate trigger is disabled (initial value) 1 forced termination of to8e by down-counter terminate trigger is enabled ? bit 3?one-shot pulse terminate enable d (oted): enables or disables forced termination of output by channel 1 down-counter terminate trigger d. bit 3: oted description 0 forced termination of to8d by down-counter terminate trigger is disabled (initial value) 1 forced termination of to8d by down-counter terminate trigger is enabled ? bit 2?one-shot pulse terminate enable c (otec): enables or disables forced termination of output by channel 1 down-counter terminate trigger c. bit 2: otec description 0 forced termination of to8c by down-counter terminate trigger is disabled (initial value) 1 forced termination of to8c by down-counter terminate trigger is enabled ? bit 1?one-shot pulse terminate enable b (oteb): enables or disables forced termination of output by channel 1 down-counter terminate trigger b. bit 1: oteb description 0 forced termination of to8b by down-counter terminate trigger is disabled (initial value) 1 forced termination of to8b by down-counter terminate trigger is enabled ? bit 0?one-shot pulse terminate enable a (otea): enables or disables forced termination of output by channel 1 down-counter terminate trigger a. bit 0: otea description 0 forced termination of to8a by down-counter terminate trigger is disabled (initial value) 1 forced termination of to8a by down-counter terminate trigger is enabled
rev. 3.0, 09/04, page 331 of 1086 11.2.14 reload enable register (rldenr) the reload enable register (rldenr) is an 8-bit register. the atu-ii has one rldenr register in channel 8. bit: 7 6 5 4 3 2 1 0 rlden ? ? ? ? ? ? ? initial value: 0 0 0 0 0 0 0 0 r/w: r/w r r r r r r r rldenr is an 8-bit readable/writable register that enables or disables loading of the reload register8 (rldr8) value into the down-counters (dcnt8i to dcnt8p). loading is performed on generation of a channel 2 compare-match signal one-shot pulse start trigger. reloading is not performed if there is no linkage with channel 2 (one-shot pulse function), or while the down- counter (dcnt8i to dcnt8p) is running. rldenr is initialized to h'00 by a power-on reset and in hardware standby mode and software standby mode. ? bit 7?reload enable (rlden): enables or disables loading of the rldr value into dcnt8i to dcnt8p. bit 7: rlden description 0 loading of reload register value into down-counters is disabled (initial value) 1 loading of reload register value into down-counters is enabled ? bits 6 to 0?reserved: these bits are always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 332 of 1086 11.2.15 free-running counters (tcnt) the free-running counters (tcnt) are 32- or 16-bit up- or up/down-counters. the atu-ii has 17 tcnt counters: one 32-bit tcnt in channel 0, and sixteen 16-bit tcnts in each of channels 1 to 7 and 11. for details of the channel 10 free-running counters, see section 11.2.26, channel 10 registers. channel abbreviation function 0 tcnt0h, tcnt0l 32-bit up-counter (initial value h'00000000) 1 tcnt1a, tcnt1b 2 tcnt2a, tcnt2b 3 tcnt3 4 tcnt4 5 tcnt5 16-bit up-counters (initial value h'0000) 6 tcnt6a?d 16-bit up/down-counters (initial value h'0001) 7 tcnt7a?d 16-bit up-counters (initial value h'0001) 11 tcnt11 16-bit up-counter (initial value h'0000) free-running counter 0 (tcnt0h, tcnt0l): free-running counter 0 (comprising tcnt0h and tcnt0l) is a 32-bit readable/writable register that counts on an input clock. the counter is started when the corresponding bit in the timer start register (tstr1) is set to 1. the input clock is selected with prescaler register 1 (pscr1). bit: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 initial value: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 initial value: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w when tcnt0 overflows (from h'ffffffff to h'00000000), the ovf0 overflow flag in the timer status register (tsr0) is set to 1. tcnt0 can only be accessed by a longword read or write. word reads or writes should not be used.
rev. 3.0, 09/04, page 333 of 1086 tcnt0 is initialized to h'00000000 by a power-on reset, and in hardware standby mode and software standby mode. free-running counters 1a, 1b, 2a, 2b, 3, 4, 5, 11 (tcnt1a, tcnt1b, tcnt2a, tcnt2b, tcnt3, tcnt4, tcnt5, tcnt11): free-running counters 1a, 1b, 2a, 2b, 3, 4, 5, and 11 (tcnt1a, tcnt1b, tcnt2a, tcnt2b, tcnt3, tcnt4, tcnt5, tcnt11) are 16-bit readable/writable registers that count on an input clock. counting is started when the corresponding bit in the timer start register (tstr1 or tstr3) is set to 1. the input clock is selected with prescaler register 1 (pscr1) and the timer control register (tcr). bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 bit name: initial value: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w the tcnt1a, tcnt1b, tcnt2a, and tcnt2b counters are cleared if incremented during counter clear trigger input from channel 10. tcnt3 to tcnt5 counter clearing is performed by a compare-match with the corresponding general register, according to the setting in tior. when one of counters tcnt1a/1b/2a/2b/3/4/5/11 overflows (from h'ffff to h'0000), the overflow flag (ovf) for the corresponding channel in the timer status register (tsr) is set to 1. tcnt1a, tcnt1b, tcnt2a, tcnt2b, tcnt3, tcnt4, tcnt5, and tcnt11 can only be accessed by a word read or write. tcnt1a, tcnt1b, tcnt2a, tcnt2b, tcnt3, tcnt4, tcnt5, and tcnt11 are initialized to h'0000 by a power-on reset, and in hardware standby mode and software standby mode. tcnt1a, tcnt1b, tcnt2a, tcnt2b, tcnt3, tcnt4, and tcnt5 can count on external clock (tclka or tclkb) input. tcnt1a, tcnt1b, tcnt2a, tcnt2b, tcnt3, tcnt4, and tcnt5 can count on an external interrupt clock (ti10) (agck) generated in channel 10 and on a channel 10 multiplied clock (agckm).
rev. 3.0, 09/04, page 334 of 1086 free-running counters 6a to 6d and 7a to 7d (tcnt6a to tcnt6d, tcnt7a to tcnt7d): free-running counters 6a to 6d and 7a to 7d (tcnt6a to tcnt6d, tcnt7a to tcnt7d) are 16-bit readable/writable registers. channel 6 and 7 counts are started by the timer start register (tstr2). the clock input to channels 6 and 7 is selected with prescaler registers 2 and 3 (pscr2, pscr3) and timer control registers 6 and 7 (tcr6, tcr7). bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 initial value: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w tcnt6a to tcnt6d (in non-complementary pwm mode) and tcnt7a to tcnt7d are cleared by a compare-match with the cycle register (cylr). tcnt6a to tcnt6d (in complementary pwm mode) count up and down between zero and the cycle register value. tcnt6a to tcnt6d and tcnt7a to tcnt7d are connected to the cpu by an internal 16-bit bus, and can only be accessed by a word read or write. tcnt6a to tcnt6d and tcnt7a to tcnt7d are initialized to h'0001 by a power-on reset, and in hardware standby mode and software standby mode. 11.2.16 down-counters (dcnt) the dcnt registers are 16-bit down-counters. the atu-ii has 16 dcnt counters in channel 8. channel abbreviation function 8 dcnt8a, dcnt8b, dcnt8c, dcnt8d, dcnt8e, dcnt8f, dcnt8g, dcnt8h, dcnt8i, dcnt8j, dcnt8k, dcnt8l, dcnt8m, dcnt8n, dcnt8o, dcnt8p 16-bit down-counters
rev. 3.0, 09/04, page 335 of 1086 down-counters 8a to 8p (dcnt8a to dcnt8p): down-counters 8a to 8p (dcnt8a to dcnt8p) are 16-bit readable/writable registers that count on an input clock. the input clock is selected with prescaler register 1 (pscr1) and the timer control register (tcr). bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 bit name: initial value: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w when the one-shot pulse function is used, dcnt8x starts counting down when the corresponding dstr bit is set to 1 by the user program after the dcnt8x value has been set. when the dcnt8x value underflows, dstr and dcnt8x are automatically cleared to 0, and the count is stopped. at the same time, the corresponding channel 8 timer status register 8 (tsr8) status flag is set to 1. when the offset one-shot pulse function is used, on compare-match with a channel 1 or 2 general register (gr) or output compare register (ocr) (the compare-match setting being made in the trigger mode register (trgmdr) (for channel 1 only) ) when the corresponding timer connection register (tcnr) bit is 1, the corresponding down-count start register (dstr) bit is automatically set to 1 and the down-count is started. when the dcnt8x value underflows, the corresponding dstr bit and dcnt8x are automatically cleared to 0, the count is stopped, and the output is inverted, or, if a one-shot terminate register (otr) setting has been made to forcibly terminate output by means of a trigger, dstr is cleared to 0 by a channel 1 or 2 compare-match between gr and ocr, the count is forcibly terminated, and the output is inverted. the output is inverted for whichever is first. when the output is inverted, the corresponding channel 8 tsr8 status flag is set to 1. the dcnt8x counters can only be accessed by a word read or write. the dcnt8x counters are initialized to h'0000 by a power-on reset, and in hardware standby mode and software standby mode. for details, see sections 11.3.5, one-shot pulse function, and 11.3.6, offset one-shot pulse function and output cutoff function.
rev. 3.0, 09/04, page 336 of 1086 11.2.17 event counters (ecnt) the event counters (ecnt) are 8-bit up-counters. the atu-ii has six ecnt counters in channel 9. channel abbreviation function 9 ecnt9a, ecnt9b, ecnt9c, ecnt9d, ecnt9e, ecnt9f 8-bit event counters the ecnt counters are 8-bit readable/writable registers that count on detection of an input signal from input pins ti9a to ti9f. rising edge, falling edge, or both rising and falling edges can be selected for edge detection. bit: 7 6 5 4 3 2 1 0 initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w when a compare-match with gr9 corresponding to an ecnt9x counter occurs, the compare- match flag (cmf9) in the timer status register (tsr9) is set to 1. when a compare-match with gr occurs, the ecnt9x counter is cleared automatically. the ecnt9x counters can only be accessed by a byte read or write. the ecnt9x counters are initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode. 11.2.18 output compare registers (ocr) the output compare registers (ocr) are 16-bit registers. the atu-ii has nine ocr registers: one in channel 1 and eight in channel 2. for details of the channel 10 free-running counters, see section 11.2.26, channel 10 registers. channel abbreviation function 1 ocr1 2 ocr2a, ocr2b, ocr2c, ocr2d, ocr2e, ocr2f, ocr2g, ocr2h output compare registers
rev. 3.0, 09/04, page 337 of 1086 output compare registers 1 and 2a to 2h (ocr1, ocr2a to ocr2h) bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 initial value: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w the ocr registers are 16-bit readable/writable registers that have an output compare register function. the ocr and free-running counter (tcnt1b, tcnt2b) values are constantly compared, and if the two values match, the cmf bit in the timer status register (tsr) is set to 1. if channels 1 and 2 and channel 8 are linked by the timer connection register (tcnr), the corresponding channel 8 down-counter (dcnt) is started at the same time. the ocr registers can only be accessed by a word read or write. the ocr registers are initialized to h'ffff by a power-on reset, and in hardware standby mode and software standby mode. 11.2.19 input capture registers (icr) the input capture registers (icr) are 32-bit registers. the atu-ii has four 32-bit icr registers in channel 0. for details of the channel 10 free-running counters, see section 11.2.26, channel 10 registers. channel abbreviation function 0 icr0ah, icr0al, icr0bh, icr0bl, icr0ch, icr0cl, icr0dh, icr0dl dedicated input capture registers
rev. 3.0, 09/04, page 338 of 1086 input capture registers 0ah, 0al to 0dh, 0dl (icr0ah, icr0al to icr0dh, icr0dl) bit: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 initial value: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r/w: r r r r r r r r r r r r r r r r bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 initial value: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r/w: r r r r r r r r r r r r r r r r the icr registers are 32-bit read-only registers used exclusively for input capture. these dedicated input capture registers store the tcnt0 value on detection of an input capture signal from an external source. the corresponding tsr0 bit is set to 1 at this time. the input capture signal edge to be detected is specified by timer i/o control register tior0. by setting the trg0den bit in tcr10, icr0dh and icr0dl can also be used for input capture in a compare match between tcnt10b and ocr10b. the icr registers can only be accessed by a longword read. word reads should not be used. the icr registers are initialized to h'00000000 by a power-on reset, and in hardware standby mode and software standby mode. 11.2.20 general registers (gr) the general registers (gr) are 16-bit registers. the atu-ii has 36 general registers: eight each in channels 1 and 2, four each in channels 3 to 5, six in channel 9, and two in channel 11. for details of the channel 10 free-running counters, see section 11.2.26, channel 10 registers. channel abbreviation function 1 gr1a?gr1h 2 gr2a?gr2h 3 gr3a?gr3d 4 gr4a?gr4d 5 gr5a?gr5d dual-purpose input capture and output compare registers 9 gr9a?gr9f dedicated output compare registers 11 gr11a, gr11b dual-purpose input capture and output compare registers
rev. 3.0, 09/04, page 339 of 1086 general registers 1a to 1h and 2a to 2h (gr1a to gr1h, gr2a to gr2h) bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 initial value: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w these gr registers are 16-bit readable/writable registers with both input capture and output compare functions. function switching is performed by means of the timer i/o control registers (tior). when a general register is used for input capture, it stores the tcnt1a or tcnt2a value on detection of an input capture signal from an external source. the corresponding imf bit in tsr is set to 1 at this time. the input capture signal edge to be detected is specified by the corresponding tior. when a general register is used for output compare, the gr value and free-running counter (tcnt1a, tcnt2a) value are constantly compared, and when both values match, the imf bit in the timer status register (tsr) is set to 1. if connection of channels 1 and 2 and channel 8 is specified in the timer connection register (tcnr), the corresponding channel 8 down-counter (dcnt) is started. compare-match output is specified by the corresponding tior. the gr registers can only be accessed by a word read or write. the gr registers are initialized to h'ffff by a power-on reset, and in hardware standby mode and software standby mode. general registers 3a to 3d, 4a to 4d, 5a to 5d, 11a and 11b (gr3a to gr3d, gr4a to gr4d, gr5a to gr5d, gr11a and gr11b) bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 initial value: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w these gr registers are 16-bit readable/writable registers with both input capture and output compare functions. function switching is performed by means of the timer i/o control registers (tior). when a general register is used for input capture, it stores the corresponding tcnt value on detection of an input capture signal from an external source. the corresponding imf bit in tsr is set to 1 at this time. the input capture signal edge to be detected is specified by the corresponding
rev. 3.0, 09/04, page 340 of 1086 tior. gr3a to gr3d can also be used for input capture with a channel 9 compare-match as the trigger. in this case, the corresponding imf bit in tsr is not set. when a general register is used for output compare, the gr value and free-running counter (tcnt) value are constantly compared, and when both values match, the imf bit in the timer status register (tsr) is set to 1. compare-match output is specified by the corresponding tior. griia and gr11b compare-match signals are transmitted to the advanced pulse controller (apc). for details, see section 12, advanced pulse controller (apc). the gr registers can only be accessed by a word read or write. the gr registers are initialized to h'ffff by a power-on reset, and in hardware standby mode and software standby mode. general registers 9a to 9f (gr9a to gr9f) bit: 7 6 5 4 3 2 1 0 initial value: 1 1 1 1 1 1 1 1 r/w: r/w r/w r/w r/w r/w r/w r/w r/w these gr registers are 8-bit readable/writable registers with a compare-match function. the gr value and event counter (ecnt) value are constantly compared, and when both values match a compare-match signal is generated and the next edge is input, the corresponding cmf bit in tsr is set to 1. in addition, channel 3 (gr3a to gr3d) input capture can be generated by gr9a to gr9d compare-matches. this function is set by trg3xen in the timer control register (tcr). the gr registers can be accessed by a byte read or write. the gr registers are initialized to h'ff by a power-on reset, and in hardware standby mode and software standby mode.
rev. 3.0, 09/04, page 341 of 1086 11.2.21 offset base registers (osbr) the offset base registers (osbr) are 16-bit registers. the atu-ii has two osbr registers, one each in channels 1 and 2. channel abbreviation function 1 osbr1 2 osbr2 dedicated input capture registers with the same input trigger signal as that for channel 0 icr0a offset base registers 1 and 2 (osbr1, osbr2) bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 initial value: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r/w: r r r r r r r r r r r r r r r r osbr1 and osbr2 are 16-bit read-only registers used exclusively for input capture. same as the channel 0 input capture register (icr0a), osbr1 and osbr2 use the ti0a input as their trigger signal, and store the tcnt1a or tcnt2a value on detection of an edge. the osbr registers can only be accessed by a word read. the osbr registers are initialized to h'0000 by a power-on reset, and in hardware standby mode and software standby mode. for details, see sections 11.3.8, twin capture function (trgmdr). 11.2.22 cycle registers (cylr) the cycle registers (cylr) are 16-bit registers. the atu-ii has eight cycle registers, four each in channels 6 and 7. channel abbreviation function 6 cylr6a? cylr6d 7 cylr7a? cylr7d 16-bit pwm cycle registers
rev. 3.0, 09/04, page 342 of 1086 cycle registers (cylr6a to cylr6d, cylr7a to cylr7d) bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 initial value: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w the cylr registers are 16-bit readable/writable registers used for pwm cycle storage. the cylr value is constantly compared with the corresponding free-running counter (tcnt6a to tcnt6d, tcnt7a to tcnt7d) value, and when the two values match, the corresponding timer start register (tsr) bit (cmf6a to cmf6d, cmf7a to cmf7d) is set to 1, and the free- running counter (tcnt6a to tcnt6d, tcnt7a to tcnt7d) is cleared. at the same time, the buffer register (bfr) value is transferred to the duty register (dtr). the corresponding output pins (to6a to to6d, to7a to to7d) go to 0 output when the bfr value is h'0000. in other cases, they go to 1 output. the cylr registers can only be accessed by a word read or write. the cylr registers are initialized to h'ffff by a power-on reset, and in hardware standby mode and software standby mode. for details of the cylr, bfr, and dtr registers, see section 11.3.9, pwm timer function. 11.2.23 buffer registers (bfr) the buffer registers (bfr) are 16-bit registers. the atu-ii has eight buffer registers, four each in channels 6 and 7. channel abbreviation function 6 bfr6a?bfr6d 16-bit pwm buffer registers buffer register (bfr) value is transferred to duty register (dtr) on compare-match of corresponding cycle register (cylr) 7 bfr7a?bfr7d buffer registers (bfr6a to bfr6d, bfr7a to bfr7d) bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 initial value: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w
rev. 3.0, 09/04, page 343 of 1086 the bfr registers are 16-bit readable/writable registers that store the value to be transferred to the duty register (dtr) in the event of a cycle register (cylr) compare-match. the bfr registers can only be accessed by a word read or write. the bfr registers are initialized to h'ffff by a power-on reset, and in hardware standby mode and software standby mode. 11.2.24 duty registers (dtr) the duty registers (dtr) are 16-bit registers. the atu-ii has eight duty registers, four each in channels 6 and 7. channel abbreviation function 6 dtr6a?dtr6d 7 dtr7a?dtr7d 16-bit pwm duty registers duty registers (dtr6a to dtr6d, dtr7a to dtr7d) bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 initial value: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w the dtr registers are 16-bit readable/writable registers used for pwm duty storage. the dtr value is constantly compared with the corresponding free-running counter (tcnt6a to tcnt6d, tcnt7a to tcnt7d) value, and when the two values match, the corresponding channel output pin (to6a to to6d, to7a to to7d) goes to 0 output. also, when cylr and the corresponding the free-running counter match, the corresponding bfr value is loaded. set a value in the range 0 to cylr for dtr; do not set a value greater than cylr. the dtr registers can only be accessed by a word read or write. the dtr registers are initialized to h'ffff by a power-on reset, and in hardware standby mode and software standby mode.
rev. 3.0, 09/04, page 344 of 1086 11.2.25 reload register (rldr) the reload register is a 16-bit register. the atu-ii has one rldr register in channel 8. reload register 8 (rldr8) bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 initial value: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w rldr8 is a 16-bit readable/writable register. when reload is enabled (by a setting in rldenr) and dstr8i to dstr8p are set to 1 by the channel 2 compare-match signal one-shot pulse start trigger, the reload register value is transferred to dcnt8i to dcnt8p before the down-count is started. the reload register value is not transferred when the one-shot pulse function is used independently, without linkage to channel 2, or when down-counters dcnt8i to dcnt8p are running. rldr8 can only be accessed by a word read or write. rldr is initialized to h'0000 by a power-on reset, and in hardware standby mode and software standby mode. 11.2.26 channel 10 registers counters (tcnt) channel 10 has seven tcnt counters: one 32-bit tcnt, four 16-bit tcnts, and two 8-bit tcnts. the input clock is selected with prescaler register 4 (pscr4). count operations are performed by setting str10 to 1 in timer start register 1 (tstr1). channel abbreviation function tcnt10ah, al 32-bit free-running counter (initial value h'00000001) tcnt10b 8-bit event counter (initial value h'00) tcnt10c 16-bit reload counter (initial value h'0001) tcnt10d 8-bit correction counter (initial value h'00) tcnt10e 16-bit correction counter (initial value h'0000) tcnt10f 16-bit correction counter (initial value h'0001) 10 tcnt10g 16-bit free-running counter (initial value h'0000)
rev. 3.0, 09/04, page 345 of 1086 free-running counter 10ah, al (tcnt10ah, tcnt10al): free-running counter 10ah, al (comprising tcnt10ah and tcnt10al) is a 32-bit readable/writable register that counts on an input clock and is cleared to initial value by input capture input (ti10) (agck). bit: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 initial value: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 initial value: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w tcnt10a can only be accessed by a longword read or write. word reads or writes should not be used. tcnt10a is initialized to h'00000001 by a power-on reset, and in hardware standby mode and software standby mode. event counter 10b (tcnt10b): event counter 10b (tcnt10b) is an 8-bit readable/writable register that counts on external clock input (ti10) (agck). for this operation, ti10 input must be set with bits ckeg1 and ckeg0 in tcr10. ti10 input will be counted even if halting of the count operation is specified by bit str10 in tstr1. bit: 7 6 5 4 3 2 1 0 initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w tcnt10b can only be accessed by a byte read or write. tcnt10b is initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode.
rev. 3.0, 09/04, page 346 of 1086 reload counter 10c (tcnt10c): reload counter 10c (tcnt10c) is a 16-bit readable/writable register. bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 initial value: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w when tcnt10c = h'0001 in the down-count operation, the value in the reload register (rld10c) is transferred to tcnt10c, and a multiplied clock (agck1) is generated. tcnt10c is connected to the cpu via an internal 16-bit bus, and can only be accessed by a word read or write. tcnt10c is initialized to h'0001 by a power-on reset, and in hardware standby mode and software standby mode. correction counter 10d (tcnt10d): correction counter 10d (tcnt10d) is an 8-bit readable/writable register that counts on external clock input (ti10) after transfer of the counter value to correction counter e (tcnt10e). set ti10 input with bits ckeg1 and ckeg0 in tcr10. transfer and counting will not be performed on ti10 input unless the count operation is enabled by bit str10 in tstr1. bit: 7 6 5 4 3 2 1 0 initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w at the external clock input (ti10) (agck) timing, the value in this counter is shifted according to the multiplication factor set by bits pim1 and pim0 in timer i/o control register 10 (tior10) and transferred to correction counter e (tcnt10e). tcnt10d can only be accessed by a byte read or write. tcnt10d is initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode.
rev. 3.0, 09/04, page 347 of 1086 correction counter 10e (tcnt10e): correction counter 10e (tcnt10e) is a 16-bit readable/writable register that loads the tcnt10d shift value at the external input (ti10) timing, and counts on the multiplied clock (agck1) output by reload counter 10c (tcnt10c). however, if ccs in timer i/o control register 10 (tior10) is set to 1, when the tcnt10d shifted value is reached the count is halted. bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 initial value: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w tcnt10e can only be accessed by a word read or write. tcnt10e is initialized to h'0000 by a power-on reset, and in hardware standby mode and software standby mode. correction counter 10f (tcnt10f): correction counter 10f (tcnt10f) is a 16-bit readable/writable register that counts up on p clock cycles if the counter value is smaller than the correction counter 10e (tcnt10e) value when the str10 bit in tstr1 has been set for counter operation. the count is halted by a match with the correction counter clear register (tcclr10). if ti10 is input when tcnt10d = h'00, tcnt10f is initialized and correction is carried out. when tcnt10f = tcclr10, tcnt10f is cleared to h'0001. while tcnt10f tcclr10, tcnt10f is incremented automatically until it reaches the tcclr10 value, and is then cleared to h'0001. a corrected clock (agckm) is output following correction each time this counter is incremented. bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 initial value: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w tcnt10f is can only be accessed by a word read or write. tcnt10f is initialized to h'0001 by a power-on reset, and in hardware standby mode and software standby mode.
rev. 3.0, 09/04, page 348 of 1086 free-running counter 10g (tcnt10g): free-running counter 10g (tcnt10g) is a 16-bit readable/writable register that counts up on the multiplied clock (agck1). tcnt10g is initialized to h'0000 by input from external input (ti10) (agck). bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 initial value: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w tcnt10g can only be accessed by a word read or write. tcnt10g is initialized to h'0000 by a power-on reset, and in hardware standby mode and software standby mode. registers there are six registers in channel 10: a 32-bit icr, 32-bit ocr, 16-bit gr, 16-bit rld, 16-bit tcclr, and 8-bit ocr. channel abbreviation function icr10ah, al 32-bit input capture register (initial value h'00000000) ocr10ah, al 32-bit output compare register (initial value h'ffffffff) ocr10b 8-bit output compare register (initial value h'ff) rld10c 16-bit reload register (initial value h'0000) gr10g 16-bit general register (initial value h'ffff) 10 tcclr10 16-bit correction counter clear register (initial value h'0000)
rev. 3.0, 09/04, page 349 of 1086 input capture register 10ah, al (icr10ah, icr10al): input capture register 10ah, al (comprising icr10ah and icr10al) is a 32-bit read-only register to which the tcnt10ah, al value is transferred on external input (ti10) (agck). at the same time, icf10a in timer status register 10 (tsr10) is set to 1. bit: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 initial value: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r/w: r r r r r r r r r r r r r r r r bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 initial value: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r/w: r r r r r r r r r r r r r r r r icr10a is initialized to h'00000000 by a power-on reset, and in hardware standby mode and software standby mode. output compare register 10ah, al (ocr10ah, ocr10al): output compare register 10ah, al (comprising ocr10ah and ocr10al) is a 32-bit readable/writable register that is constantly compared with free-running counter 10ah, al (tcnt10ah, tcnt10al). when both values match, cmf10a in timer status register 10 (tsr10) is set to 1. bit: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 initial value: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 initial value: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w ocr10a is initialized to h'ffffffff by a power-on reset, and in hardware standby mode and software standby mode.
rev. 3.0, 09/04, page 350 of 1086 output compare register 10b (ocr10b): output compare register 10b (ocr10b) is an 8-bit readable/writable register that is constantly compared with free-running counter 10b (tcnt10b). when agck is input with both values matching, cmf10b in timer status register 10 (tsr10) is set to 1. bit: 7 6 5 4 3 2 1 0 initial value: 1 1 1 1 1 1 1 1 r/w: r/w r/w r/w r/w r/w r/w r/w r/w ocr10b is initialized to h'ff by a power-on reset, and in hardware standby mode and software standby mode. reload register 10c (rld10c): reload register 10c (rld10c) is a 16-bit readable/writable register. when str10 in timer start register 1 (tstr1) is 1 and rlden in the timer i/o control register (tior10) is 0, and the value of tcnt10a is captured into input capture register 10a (icr10a), the icr10a capture value is shifted according to the multiplication factor set by bits pim1 and pim0 in tior10 before being transferred to rld10c. the contents of reload register 10c (rld10c) are loaded when reload counter 10c (tcnt10c) reaches h'0001. bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 initial value: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w rld10c is initialized to h'0000 by a power-on reset, and in hardware standby mode and software standby mode. general register 10g (gr10g): general register 10g (gr10g) is a 16-bit readable/writable register with an output compare function. function switching is performed by means of timer i/o control register 10 (tior10). the gr10g value and free-running counter 10g (tcnt10g) value are constantly compared, and when agck is input with both values matching, cmf10g in timer status register 10 (tsr10) is set to 1. bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 initial value: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w gr10g is initialized to h'ffff by a power-on reset, and in hardware standby mode and software standby mode.
rev. 3.0, 09/04, page 351 of 1086 correction counter clear register 10 (tcclr10): correction counter clear register 10 (tcclr10) is a 16-bit readable/writable register. tcclr10 is constantly compared with tcnt10f, and when the two values match, tcnt10f halts. tcntxx can be cleared at this time by setting trgxxen (xx = 1a, 1b, 2a, 2b) in tcr10. then, when tcnt10d is h'00 and ti10 is input, tcnt10f is cleared to h'0001. bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 initial value: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w tcclr10 is initialized to h'0000 by a power-on reset, and in hardware standby mode and software standby mode. noise canceler registers there are two 8-bit noise canceler registers in channel 10: tcnt10h and ncr10. channel abbreviation function tcnt10h noise canceler counter (initial value h'00) 10 ncr10 noise canceler compare-match register (initial value h'ff) noise canceler counter 10h (tcnt10h): noise canceler counter 10h (tcnt10h) is an 8-bit readable/writable register. when the noise canceler function is enabled, tcnt10h starts counting up on p 10, with the signal from external input (ti10) (agck) as a trigger. the counter operates even if str10 is cleared to 0 in the timer start register (tstr1). ti10 input is masked while the counter is running. when the count matches the noise canceler register (ncr10) value, the counter is cleared and ti10 input masking is released. bit: 7 6 5 4 3 2 1 0 initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w tcnt10h is initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode.
rev. 3.0, 09/04, page 352 of 1086 noise canceler register 10 (ncr10): noise canceler register 10 (ncr10) is an 8-bit readable/writable register used to set the upper count limit of noise canceler counter 10h (tcnt10h). tcnt10h is constantly compared with ncr10 during the count, and when a compare-match occurs the tcnt10h counter is halted and input signal masking is released. bit: 7 6 5 4 3 2 1 0 initial value: 1 1 1 1 1 1 1 1 r/w: r/w r/w r/w r/w r/w r/w r/w r/w ncr10 is initialized to h'ff by a power-on reset, and in hardware standby mode and software standby mode. channel 10 control registers there are four control registers in channel 10. channel abbreviation function tior10 reload setting, counter correction setting, external input (ti10) edge interval multiplier setting gr compare-match setting (initial value h'00) tcr10 tcclr10 counter clear source noise canceler function enabling/disabling selection external input (ti10) edge selection (initial value h'00) tsr10 input capture/compare-match status (initial value h'0000) 10 tier10 input capture/compare-match interrupt request enabling/disabling selection (initial value h'0000)
rev. 3.0, 09/04, page 353 of 1086 timer i/o control register 10 (tior10): tior10 is an 8-bit readable/writable register that selects the value for multiplication of the external input (ti10) edge interval. it also makes a setting for using the general register (gr10g) for output compare, and makes the edge detection setting. tior10 is initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode. bit: 7 6 5 4 3 2 1 0 rlden ccs pim1 pim0 ? io10g2 io10g1 io10g0 initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w ? r/w r/w r/w ? bit 7?reload enable (rlden): enables or disables transfer of the input capture register 10a (icr10a) value to reload register 10c (rld10c). bit 7: rlden description 0 transfer of icr10a value to rld10c on input capture is enabled (initial value) 1 transfer of icr10a value to rld10c on input capture is disabled ? bit 6?counter clock select (ccs): selects the operation of correction counter 10e (tcnt10e). set the multiplication factor with bits pim1 and pim0. bit 6: ccs description 0 tcnt10e count is not halted when tcnt10d x multiplication factor = tcnt10e * (initial value) 1 tcnt10e count is halted when tcnt10d x multiplication factor = tcnt10e * note: * when [tcnt10d multiplication factor] matches the value of tcnt10e with bits 8 to 0 masked ? bits 5 and 4?pulse interval multiplier (pim1, pim0): these bits select the external input (ti10) cycle multiplier. bit 5: pim1 bit 4: pim0 description 0 counting on external input cycle 32 (initial value) 0 1 counting on external input cycle 64 0 counting on external input cycle 128 1 1 counting on external input cycle 256 ? bit 3?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 354 of 1086 ? bits 2 to 0?i/o control 10g2 to 10g0 (io10g2 to io10g0): these bits select the function of general register 10g (gr10g). bit 2: io10g2 bit 1: io10g1 bit 0: io10g0 description 0 compare-match disabled (initial value) 0 1 gr10g = tcnt10g compare-match 0 1 * gr is an output compare register cannot be used 1 * * cannot be used * : don't care timer control register 10 (tcr10): tcr10 is an 8-bit readable/writable register that selects the correction counter clear register (tcclr10) compare-match counter clear source, enables or disables the noise canceler function, and selects the external input (ti10) edge. tcr10 is initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode. bit: 7 6 5 4 3 2 1 0 trg2ben trg1ben trg2aen trg1aen trg0den nce ckeg1 ckeg0 initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w ? bit 7?trigger 2b enable (trg2ben): enables or disables counter clearing for channel 2 tcnt2b. when clearing is enabled, set the correction angle clock (agckm) as the tcnt2b count clock. if tcnt2b counts while clearing is enabled, tcnt2b will be cleared. bit 7: trg2ben description 0 channel 2 counter b (tcnt2b) clearing when correction counter clear register (tcclr10) = correction counter (tcnt10f) is disabled (initial value) 1 channel 2 counter b (tcnt2b) clearing when correction counter clear register (tcclr10) = correction counter (tcnt10f) is enabled
rev. 3.0, 09/04, page 355 of 1086 ? bit 6?trigger 1b enable (trg1ben): enables or disables counter clearing for channel 1 tcnt1b. when clearing is enabled, set the correction angle clock (agckm) as the tcnt1b count clock. if tcnt1b counts while clearing is enabled, tcnt1b will be cleared. bit 6: trg1ben description 0 channel 1 counter b (tcnt1b) clearing when correction counter clear register (tcclr10) = correction counter (tcnt10f) is disabled (initial value) 1 channel 1 counter b (tcnt1b) clearing when correction counter clear register (tcclr10) = correction counter (tcnt10f) is enabled ? bit 5?trigger 2a enable (trg2aen): enables or disables counter clearing for channel 2 tcnt2a. when clearing is enabled, set the correction angle clock (agckm) as the tcnt2a count clock. if tcnt2a counts while clearing is enabled, tcnt2a will be cleared. bit 5: trg2aen description 0 channel 2 counter 2a (tcnt2a) clearing when correction counter clear register (tcclr10) = correction counter (tcnt10f) is disabled (initial value) 1 channel 2 counter 2a (tcnt2a) clearing when correction counter clear register (tcclr10) = correction counter (tcnt10f) is enabled ? bit 4?trigger 1a enable (trg1aen): enables or disables counter clearing for channel 1 tcnt1a. when clearing is enabled, set the correction angle clock (agckm) as the tcnt1a count clock. if tcnt1a counts while clearing is enabled, tcnt1a will be cleared. bit 4: trg1aen description 0 channel 1 counter 1a (tcnt1a) clearing when correction counter clear register (tcclr10) = correction counter (tcnt10f) is disabled (initial value) 1 channel 1 counter 1a (tcnt1a) clearing when correction counter clear register (tcclr10) = correction counter (tcnt10f) is enabled ? bit 3?trigger 0d enable (trg0den): enables or disables channel 0 icr0d input capture signal requests. bit 3: trg0den description 0 capture requests for channel 0 input capture register (icr0d) on event counter (tcnt10b) compare-match are disabled (initial value) 1 capture requests for channel 0 input capture register (icr0d) on event counter (tcnt10b) compare-match are enabled
rev. 3.0, 09/04, page 356 of 1086 ? bit 2?noise canceler enable (nce): enables or disables the noise canceler function. bit 2: nce description 0 noise canceler function is disabled (initial value) 1 noise canceler function is enabled ? bits 1 and 0?clock edge 1 and 0 (ckeg1, ckeg0): these bits select the channel 10 external input (ti10) edge(s). the clock (agck) is generated by the detected edge(s). bit 1: ckeg1 bit 0: ckeg0 description 0 ti10 input disabled (initial value) 0 1 ti10 input rising edges detected 0 ti10 input falling edges detected 1 1 ti10 input rising and falling edges both detected timer status register 10 (tsr10): tsr10 is a 16-bit readable/writable register that indicates the occurrence of channel 10 input capture or compare-match. each flag is an interrupt source, and issues an interrupt request to the cpu if the interrupt is enabled by the corresponding bit in timer interrupt enable register 10 (tier10). tsr10 is initialized to h'0000 by a power-on reset, and in hardware standby mode and software standby mode. bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ? initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r bit: 7 6 5 4 3 2 1 0 ? ? ? ? cmf10g cmf10b icf10a cmf10a initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r/(w) * r/(w) * r/(w) * r/(w) * note: * only 0 can be written to clear the flag. ? bits 15 to 4?reserved: these bits are always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 357 of 1086 ? bit 3?compare-match flag 10g (cmf10g): status flag that indicates gr10g compare- match. bit 3: cmf10g description 0 [clearing condition] (initial value) when cmf10g is read while set to 1, then 0 is written to imf10g 1 [setting condition] when tcnt10g = gr10g ? bit 2?compare-match flag 10b (cmf10b): status flag that indicates ocr10b compare- match. bit 2: cmf10b description 0 [clearing condition] (initial value) when cmf10b is read while set to 1, then 0 is written to cmf10b 1 [setting condition] when tcnt10b is incremented while tcnt10b = ocr10b ? bit 1?input capture flag 10a (icf10a): status flag that indicates icr10a input capture. bit 1: icf10a description 0 [clearing condition] (initial value) when icr10a is read while set to 1, then 0 is written to icr10a 1 [setting condition] when the tcnt10a value is transferred to icr10a by an input capture signal ? bit 0?compare-match flag 10a (cmf10a): status flag that indicates ocr10a compare- match. bit 0: cmf10a description 0 [clearing condition] (initial value) when cmf10a is read while set to 1, then 0 is written to cmf10a 1 [setting condition] when tcnt10a = ocr10a
rev. 3.0, 09/04, page 358 of 1086 timer interrupt enable register 10 (tier10): tier10 is a 16-bit readable/writable register that controls enabling/disabling of channel 10 input capture and compare-match interrupt requests. tier10 is initialized to h'0000 by a power-on reset, and in hardware standby mode and software standby mode. bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ? initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r bit: 7 6 5 4 3 2 1 0 ? ? ? ireg cme10g cme10b ice10a cme10a initial value: 0 0 0 0 0 0 0 0 r/w: r r r r/w r/w r/w r/w r/w ? bits 15 to 5?reserved: these bits are always read as 0. the write value should always be 0. ? bit 4?interrupt enable edge g (ireg): specifies tsr10 cmf10g interrupt request timing. bit 4: ireg description 0 interrupt is requested when cmf10g becomes 1 (initial value) 1 interrupt is requested by next external input (ti10) (agck) after cmf10g becomes 1 ? bit 3?compare-match interrupt enable 10g (cme10g): enables or disables interrupt requests by cmf10g in tsr10 when cmf10g is set to 1. bit 3: cme10g description 0 cmi10g interrupt requested by cmf10g is disabled (initial value) 1 cmi10g interrupt requested by cmf10g is enabled ? bit 2?compare-match interrupt enable 10b (cme10b): enables or disables interrupt requests by cmf10b in tsr10 when cmf10b is set to 1. bit 2: cme10b description 0 cmi10b interrupt requested by cmf10b is disabled (initial value) 1 cmi10b interrupt requested by cmf10b is enabled
rev. 3.0, 09/04, page 359 of 1086 ? bit 1?input capture interrupt enable 10a (ice10a): enables or disables interrupt requests by icf10a in tsr10 when icf10a is set to 1. bit 1: ice10a description 0 ici10a interrupt requested by icf10a is disabled (initial value) 1 ici10a interrupt requested by icf10a is enabled ? bit 0?compare-match interrupt enable 10a (cme10a): enables or disables interrupt requests by cmf10a in tsr10 when cmf10a is set to 1. bit 0: cme10a description 0 cmi10a interrupt requested by cmf10a is disabled (initial value) 1 cmi10a interrupt requested by cmf10a is enabled
rev. 3.0, 09/04, page 360 of 1086 11.3 operation 11.3.1 overview the atu-ii has twelve timers of eight kinds in channels 0 to 11. it also has a built-in prescaler that generates input clocks, and it is possible to generate or select internal clocks of the required frequency independently of circuitry outside the atu-ii. the operation of each channel and the prescaler is outlined below. channel 0: channel 0 has a 32-bit free-running counter (tcnt0) and four 32-bit input capture registers (icr0a to icr0d). tcnt0 is an up-counter that performs free-running operation. an interrupt request can be generated on counter overflow. the four input capture registers (icr0a to icr0d) capture the free-running counter (tcnt0) value by means of input from the corresponding external signal input pin (ti0a to ti0d). for capture by means of input from an external signal input pin, rising edge, falling edge, or both edges can be selected in the timer i/o control register (tior0). in the case of input capture register 0d (icr0d) only, capture can be performed by means of a compare-match between free-running counter 10b (tcnt10b) and compare-match register 10b (ocr10b), by making a setting in timer control register 10 (tcr10). in this case, capture is performed even if an input capture disable setting has been made for tior0. in each case, the dmac can be activated or an interrupt requested when capture occurs. channel 0 also has three interval interrupt request registers (itvrr1, itvrr2a, and itvrr2b). a/d converter (ad0 to ad2) activation can be selected by setting 1 in itva6 to itva13 in itvrr, and an interrupt request to the cpu by setting 1 in itve6 to itve13. these operations are performed when the corresponding bit of bits 6 to 13 in tcnt0 changes to 1, enabling use as an interval timer function. channel 1: channel 1 has two 16-bit free-running counters (tcnt1a and tcnt1b), eight 16-bit general registers (gr1a to gr1h), and a 16-bit output compare register (ocr1). tcnt1a and tcnt1b are up-counters that perform free-running operation. when the clock generated in channel 10 (described below) is selected, these counters can be cleared at the count specified in channel 10. each counter can generate an interrupt request when it overflows. the eight general registers (gr1a to gr1h) can be used as input capture or output compare registers using the corresponding external signal i/o pin (tio1a to tio1h). when used for input capture, the free-running counter (tcnt1a) value is captured by means of input from the corresponding external signal i/o pin (tio1a to tio1h). rising edge, falling edge, or both edges can be selected for the input capture signal in the timer i/o control registers (tior1a to tior1d). when used for output compare, compare-match with the free-running counter (tcnt1a) is performed. for the output from the external signal i/o pins by compare-match, 0 output, 1 output, or toggle output can be selected in the timer i/o control registers (tior1a to
rev. 3.0, 09/04, page 361 of 1086 tior1d). when used as output compare registers, a compare-match can be used as a one-shot pulse start/terminate trigger by setting the channel 8 timer connection register (tcnr) and one- shot pulse terminate register (otr), and using these in combination with the down-counters (dcnt8a to dcnt8h). start/terminate trigger selection is performed by means of the trigger mode register (trgmdr). in the case of the output compare register (ocr1), a tcnt1b compare-match can be used as a one-shot pulse start trigger, in the same way as the general registers, in combination with channel 8 down-counters dcnt8a to dcnt8h. an interrupt can be requested on the occurrence of the respective input capture or compare-match. in addition, channel 1 has a 16-bit dedicated input capture register (osbr1). the channel 0 ti0a input pin can also be used as the osbr1 trigger input, enabling use of a twin-capture function. channel 2: channel 2 has two 16-bit free-running counters (tcnt2a and tcnt2b), eight 16-bit general registers (gr2a to gr2h), and eight 16-bit output compare registers (ocr2a to ocr2h). tcnt2a and tcnt2b are up-counters that perform free-running operation. when the clock generated in channel 10 (described below) is selected, these counters can be cleared at the count specified in channel 10. each counter can generate an interrupt request when it overflows. the eight general registers (gr2a to gr2h) can be used as input capture or output compare registers using the corresponding external signal i/o pin (tio2a to tio2h). when used for input capture, the free-running counter (tcnt2a) value is captured by means of input from the corresponding external signal i/o pin (tio2a to tio2h). rising edge, falling edge, or both edges can be selected for the input capture signal in the timer i/o control registers (tior2a to tior2d). when used for output compare, compare-match with the free-running counter (tcnt2a) is performed. for the output from the external signal i/o pins by compare-match, 0 output, 1 output, or toggle output can be selected in the timer i/o control registers (tior2a to tior2d). when used as output compare registers, a compare-match can be used as a one-shot pulse terminate trigger by setting the channel 8 one-shot pulse terminate register (otr), and using this in combination with the down-counters (dcnt8i to dcnt8p). in the case of the output compare registers (ocr2a to ocr2h), a tcnt2b compare-match can be used as a one-shot pulse start trigger by setting the channel 8 timer connection register (tcnr), and using this in combination with the down-counters (dcnt8i to dcnt8p). an interrupt can be requested on the occurrence of the respective input capture or compare-match. in addition, channel 2 has a 16-bit dedicated input capture register (osbr2). the channel 0 ti0a input pin can also be used as the osbr2 trigger input, enabling use of a twin-capture function. channels 3 to 5: channels 3 to 5 each have a 16-bit free-running counter (tcnt3 to tcnt5) and four 16-bit general registers (gr3a to gr3d, gr4a to gr4d, gr5a to gr5d). tcnt3 to tcnt5 are up-counters that perform free-running operation. channels 3 to 5 each have a 16-bit
rev. 3.0, 09/04, page 362 of 1086 free-running counter (tcnt3 to tcnt5) and four 16-bit general registers (gr3a to gr3d, gr4a to gr4d, gr5a to gr5d). tcnt3 to tcnt5 are up-counters that perform free-running operation. in addition, counter clearing can be performed by compare-match by making a setting in the timer i/o control register (tior3a, tior3b, tior4a, tior4b, tior5a, tior5b). each counter can generate an interrupt request when it overflows. the four general registers (gr3a to gr3d, gr4a to gr4d, gr5a to gr5d) each have corresponding external signal i/o pins (tio3a to tio3d, tio4a to tio4d, tio5a to tio5d), and can be used as input capture or output compare registers. when used for input capture, the free-running counter (tcnt3 to tcnt5) value is captured by means of input from the corresponding external signal i/o pin (tio3a to tio3d, tio4a to tio4d, tio5a to tio5d). rising edge, falling edge, or both edges can be selected for the input capture signal in the timer i/o control registers (tior3a, tior3b, tior4a, tior4b, tior5a, tior5b). also, in use for input capture, input capture can be performed using a compare-match between a channel 9 event counter (ecnt9a to ecnt9d), described later, and a general register (gr9a to gr9d) as the trigger (channel 3 only). in this case, capture is performed even if an input capture disable setting has been made for tior3a to tior3d. when used for output compare, compare-match with the free-running counter (tcnt3 to tcnt5) is performed. for the output from the external signal i/o pins by compare-match, 0 output, 1 output, or toggle output can be selected in the timer i/o control registers (tior3a, tior3b, tior4a, tior4b, tior5a, tior5b). an interrupt can be requested on the occurrence of the respective input capture or compare-match. however, in the case of input capture using channel 9 as a trigger, an interrupt request from channel 3 cannot be used. by selecting pwm mode in the timer mode register (tmdr), pwm output can be obtained, with three outputs for each. in this case, gr3d, gr4d, and gr5d are automatically used as cycle registers, and gr3a to gr3c, gr4a to gr4c, gr5a to gr5c, as duty registers. tcnt3 to tcnt5 are cleared by the corresponding gr3d, gr4d, or gr5d compare-match. channels 6 and 7: channels 6 and 7 each have 16-bit free-running counters (tcnt6a to tcnt6d, tcnt7a to tcnt7d), 16-bit cycle registers (cylr6a to cylr6d, cylr7a to cylr7d), 16-bit duty registers (dtr6a to dtr6d, dtr7a to dtr7d), and buffer registers (bfr6a to bfr6d, bfr7a to bfr7d). channels 6 and 7 also each have external output pins (to6a to to6d, to7a to to7d), and can be used as buffered pwm timers. the tcnt registers are up-counters, and 0 is output to the corresponding external output pin when the tcnt value matches the dtr value (when dtr cylr). when the tcnt value matches the cylr value (when dtr h'0000), 1 is output to the external output pin, tcnt is initialized to h'0001, and the bfr value is transferred to dtr. thus, the configuration of channels 6 and 7 enables them to perform waveform output with the cylr value as the cycle and the dtr value as the duty, and to use bfr to absorb the time lag between setting of data in dtr and compare-match occurrence. when dtr = cylr, 1 is output continuously to the external output pin, giving a duty of 100%. when dtr = h'0000, 0 is output continuously to the external output pin, giving a duty of 0%. do not set a value in dtr that will result in the condition dtr > cylr. to set h'0000 to dtr, not
rev. 3.0, 09/04, page 363 of 1086 write h'0000 directly to dtr but set h'0000 to bfr and then transfer the value to dtr. writing h'0000 directly to dtr may not give a duty of 0%. in channel 6, tcnt can also be designated for complementary pwm output by means of the pwm mode register (pmdr). when the corresponding tstr is set to 1, tcnt starts counting up, then switches to a down-count when the count matches the cylr value. when tcnt reaches h'0000, it starts counting up again. when tcnt = dtr, the corresponding to6a to to6d output changes. whether tcnt is counting up or down can be ascertained from the timer status register (tsr6). dmac activation and interrupt request generation, respectively, are possible when tcnt = cylr in asynchronous pwm mode, and when tcnt = h'0000 in complementary pwm mode. channel 8: channel 8 has sixteen 16-bit down-counters (dcnt8a to dcnt8p). the down- counters have corresponding external signal output pins, and can generate one-shot pulses. setting a value in dcnt and setting the corresponding bit to 1 in the down-count start register (dstr) starts dcnt operation and simultaneously outputs 1 to the external output pin. when dcnt counts down to h'0000, it stops and outputs 0 to the external output pin. an interrupt can be requested when dcnt underflows. down-counter operation can be coupled with the channel 1 or channel 2 output compare function by means of settings in the timer connection register (tcnr) and one-shot pulse terminate register (otr), respectively, so that dcnt8i to dcnt8h count operations are started and stopped from channel 1, and dcnt8i to dcnt8p count operations from channel 2. dcnt8i to dcnt8p have a reload register (rldr), and a setting in the reload enable register (rlden) enables count operations to be started after reading the value from this register. channel 9: channel 9 has six 8-bit event counters (ecnt9a to ecnt9f) and six 8-bit general registers (gr9a to gr9f). the event counters are up-counters, each with a corresponding external input pin (ecnt9a to ecnt9f). the event counter value is incremented by input from the corresponding external input pin. incrementing on the rising edge, falling edge, or both edges can be selected by means of settings in the timer control registers (tcr9a to tcr9c). an event counter is cleared by edge input after a match with the corresponding general register. an interrupt can requested when an event counter is cleared. timer control register (tcr9a, tcr9b) settings can be made to enable event counters ecnt9a to ecnt9d to send a compare-match signal to channel 3 when the count matches the corresponding general register (gr9a to gr9d), allowing input capture to be performed on channel 3. this enables the pulse input interval to be measured. channel 10: channel 10 generates a multiplied clock based on external input, and supplies this to channels 1 to 5. channel 10 is divided into three blocks: (1) an inter-edge measurement block, (2) a multiplied clock generation block, and (3) a multiplied clock correction block.
rev. 3.0, 09/04, page 364 of 1086 (1) inter-edge measurement block this block has a 32-bit free-running counter (tcnt10a), 32-bit input capture register (icr10a), 32-bit output compare register (ocr10a), 8-bit event counter (tcnt10b), 8-bit output compare register (ocr10b), 8-bit noise canceler counter (tcnt10h), and 8-bit noise canceler compare-match register (ncr10). the 32-bit free-running counter (tcnt10a) is an up-counter that performs free-running operations. when input capture is performed by means of ti10 input, this counter is cleared to h'00000001. when free-running counter (tcnt10a) reaches the value set in the output compare register (ocr10a), a compare-match interrupt can be requested. the input capture register (icr10a) has an external signal input pin (ti10), and the free- running counter (tcnt10a) value can be captured by means of input from ti10. rising edge, falling edge, or both edges can be selected by making a setting in bits ckeg1 and ckeg0 in the timer control register (tcr10). the ti10 input has a noise canceler function, which can be enabled by setting the nce bit in the timer control register (tcr10). when the counter value is captured, tcnt10a is cleared to 0 and an interrupt can be requested. the captured value can be transferred to the multiplied clock generation block reload register (rld10c). the 8-bit event counter (tcnt10b) is an up-counter that is incremented by ti10 input. when the event counter (tcnt10b) value reaches the value set in the output compare register (ocr10b), a compare-match interrupt can be requested. by setting the trg0den bit in the timer control register (tcr10), a capture request can also be issued for the channel 0 input capture register 0d (icr0d) when compare-match occurs. the 8-bit noise canceler counter (tcnt10h) and 8-bit noise canceler compare-match register (ncr10) are used to set the period for which the noise canceler functions. by setting a value in the noise canceler compare-match register (tcnt10h) and setting the nce bit in the timer control register (tcr10), ti10 input is masked when it occurs. at the same time as ti10 input is masked, the noise canceler counter (tcnt10h) starts counting up on the p x10 clock. when the noise canceler counter (tcnt10h) value matches the noise canceler compare-match register (ncr10) value, the noise canceler counter (tcnt10h) is cleared to h'0000 and ti10 input masking is cleared. (2) multiplied clock generation block this block has 16-bit reload counters (tcnt10c, rld10c), a 16-bit register free-running counter (tcnt10g), and a 16-bit general register (gr10g). 16-bit reload counter 10c (rld10c) is captured by 32-bit input capture register 10a (icr10a), and when rlden in the timer i/o control register (tior10) is 0, the value captured in input capture register 10a is transferred to the multiplied clock generation block reload register (rld10c). the value transferred can be selected from 1/32, 1/64, 1/128, or 1/256 the original value, according to the setting of bits pim1 and pim0 in tior10.
rev. 3.0, 09/04, page 365 of 1086 16-bit reload counter 10c (tcnt10c) performs down-count operations. when tcnt10c reaches h'0001, the value is read automatically from the reload buffer (rld10c), internal clock agck1 is generated, and the down-count operation is repeated. internally generated agck1 is input as a clock to the multiplied clock correction block 16-bit correction counter (tcnt10e) and 16-bit free-running counter 10g (tcnt10g). 16-bit register free-running counter 10g (tcnt10g) counts on agck1 generated by tcnt10c. it is initialized to h'0000 by external input from ti10. the 16-bit general register (gr10g) can be used in a compare-match with free-running counter 10g (tcnt10g) by setting bits io10g2 to io10g0 in the timer i/o control register (tior10). an interrupt can be requested when a compare-match occurs. also, by setting timer interrupt enable register 10 (tier10), an interrupt can be request in the event of ti10 input after a compare-match. (3) multiplied clock correction block this block has three 16-bit correction counters (tcnt10d, tcnt10e, tcnt10f) and a 16- bit correction counter clear register (tcclr10). when 32-bit input capture register 10a (icr10a) performs a capture operation due to input from external input pin ti10, the value in correction counter 10d (tcnt10d) is transferred to tcnt10e and tcnt10d is incremented. the value transferred to tcnt10e is 32, 64, 128, or 256 times the tcnt10d value, according to the setting of bits pim1 and pim0 in the timer i/o control register (tior10). 16-bit correction counter 10e (tcnt10e) counts up on agck1 generated by reload counter 10c (tcnt10c, rld10c) in the multiplied clock generation block. however, by setting the ccs bit in the timer i/o control register (tior10), it is possible to stop free-running counter 10e (tcnt10e) when the free-running counter 10d (tcnt10d) multiplication value specified by pim1 and pim0 and the free-running counter 10e (tcnt10e) value match. the multiplied tcnt10d value is transferred when input capture register 10a (icr10a) performs a capture operation due to ti10 input.
rev. 3.0, 09/04, page 366 of 1086 16-bit correction counter 10f (tcnt10f) has p as its input and is constantly compared with 16-bit correction counter 10e (tcnt10e). when the 16-bit correction counter 10f (tcnt10f) value is smaller than that in 16-bit correction counter 10e (tcnt10e), it is incremented and generates count-up agckm. when the 16-bit correction counter 10f (tcnt10f) value exceeds that in 16-bit correction counter 10e (tcnt10e), no count-up operation is performed. the ti10 multiplied signal (agckm) generated when tcnt10f is incremented is output to the channel 1 to 5 free-running counters (tcnt1a, tcnt1b, tcnt2a, tcnt2b, tcnt3, tcnt4, tcnt5), and an up-count can be performed on agckm by setting this as the counter clock on each channel. tcnt10f is constantly compared with the 16-bit correction counter clear register (tcclr10), and when the free- running counter 10f (tcnt10f) and correction counter clear register (tcclr10) values match, the tcnt10f up-count stops. setting trg1aen, trg1ben, trg2aen, and trg2ben in the timer control register (tcr10) enables the channel 1 and 2 free-running counters (tcnt1a, tcnt1b, tcnt2a, tcnt2b) to be cleared at this time. if ti10 is input when tcnt10d = h'0000, initialization and correction operations are performed. when tcnt10f = tcclr10, tcnt10f is cleared to h'0001. when tcnt10f tcclr10, tcnt10f automatically counts up to the tcclr10 value, and is cleared to h'0001. channel 11: channel 11 has a 16-bit free-running counter (tcnt11) and two 16-bit general registers (gr11a and gr11b). tcnt11 is an up-counter that performs free-running operation. the counter can generate an interrupt request when it overflows. the two general registers (gr11a and gr11b) each have a corresponding external signal i/o pin (tio11a, tio11b), and can be used as input capture or output compare registers. when used for input capture, the free-running counter (tcnt11) value is captured by means of input from the corresponding external signal i/o pin (tio11a, tio11b). rising edge, falling edge, or both edges can be selected for the input capture signal in the timer i/o control register (tior11). when used for output compare, compare-match with the free-running counter (tcnt11) is performed. for the output from the external signal i/o pins by compare-match, 0 output, 1 output, or toggle output can be selected in the timer i/o control register (tior11). an interrupt can be requested on the occurrence of the respective input capture or compare-match. when the two general registers (gr11a and gr11b) are designated for compare-match use, a compare-match signal can be output to the apc. prescaler: the atu-ii has a dedicated prescaler with a 2-stage configuration. the first stage comprises 5-bit prescalers (pscr1 to pscr4) that generate a 1/m clock (where m = 1 to 32) with respect to clock p . the second prescaler stage allows selection of a clock obtained by further scaling the clock from the first stage by 2 n (where n = 0 to 5) according to the timer control registers for the respective channels (tcr1a, tcr1b, tcr2a, tcr2b, tcr3 to tcr5, tcr6a, tcr6b, tcr7a, tcr7b, tcr8, tcr11). the prescalers of channels 1 to 8 and 11 have a 2-stage configuration, while the channel 0 and 10 prescalers only have a first stage. the first-stage prescaler is common to channels 0 to 5, 8, and
rev. 3.0, 09/04, page 367 of 1086 11, and it is not possible to set different first-stage division ratios for each. channels 6, 7, and 10 each have a first-stage prescaler, and different first-stage division ratios can be set for each. 11.3.2 free-running counter operation and cyclic counter operation the free-running counters (tcnt) in atu-ii channels 0 to 5 and 11 start counting up as free- running counters when the corresponding timer start register (tstr) bit is set to 1. when tcnt overflows (channel 0: from h'ffffffff to h'00000000; channels 1 to 5 and 11: from h'ffff to h'0000), the ovf bit in the timer status register (tsr) is set to 1. if the ove bit in the corresponding timer interrupt enable register (tier) is set to 1 at this time, an interrupt request is sent to the cpu. after overflowing, tcnt starts counting up again from h'00000000 or h'0000. if the tstr value is cleared to 0 during tcnt operation, the corresponding tcnt halts. in this case, tcnt is not reset. if external output is being performed from the gr for the corresponding tcnt, the output value does not change. channel 0 free-running counter operation is shown in figure 11.13. fffffffd p tstr str0 tcnt0 clock tcnt0 tsr0 ovf0 cleared by software 00000002 00000001 00000000 ffffffff fffffffe 00000006 00000005 00000004 00000003 00000002 00000001 figure 11.13 free-running counter operation and overflow timing the free-running counters (tcnt) in atu-ii channels 6 and 7 perform cyclic count operations unconditionally. with channel 3 to 5 free-running counters (tcnt), when the corresponding t3pwm to t5pwm bit in the timer mode register (tmdr) is set to 1, or the corresponding cci bit in the timer i/o control register (tior) is set to 1 when bits t3pwm to t5pwm are 0, the counter for the relevant channel performs a cyclic count. the relevant tcnt counter is cleared by a compare-match of tcnt with gr3d, gr4d, or gr5d in channel 3 to 5, or cylr in channels 6 and 7 (counter clear function). tcnt starts counting up as a cyclic counter when the corresponding str bit in tstr is set to 1 after the tmdr setting is made. when the count value matches the gr3d, gr4d, gr5d, or cylr value, the corresponding imf3d, imf4d, or imf5d bit in the timer status register (tsr) (or the cmf bit in tsr6 or tsr7 for channels 6 and 7) is set to 1, and tcnt is cleared to h'0000 (h'0001 in channels 6 and 7).
rev. 3.0, 09/04, page 368 of 1086 if the corresponding tier bit is set to 1 at this time, an interrupt request is sent to the cpu. after the compare-match, tcnt starts counting up again from h'0000 (h'0001 in channels 6 and 7). figure 11.14 shows the operation when channel 3 is used as a cyclic counter (with a cycle setting of h'0008). p tcnt3 clock tcnt3 gr3d (period) tsr3 imf3d cleared by software cleared by software 0005 0004 0003 0002 0001 0000 0008 0007 0003 0002 0008 0008 0001 0000 0008 figure 11.14 example of cyclic counter operation 11.3.3 compare-match function designating general registers in channels 1 to 5 and 11 (gr1a to gr1h, gr2a to gr2h, gr3a to gr3d, gr4a to gr4d, gr5a to gr5d, gr11a, gr11b) for compare-match operation in the timer i/o control registers (tior1 to tior5, tior11) enables compare-match output to be performed at the corresponding external pins (tio1a to tio1h, tio2a to tio2h, tio3a to tio3d, tio4a to tio4d, tio5a to tio5d, tio11a, tio11b). a free-running counter (tcnt) starts counting up when 1 is set in the timer status register (tstr). when the desired number is set beforehand in gr, and the tcnt value matches the gr value, the timer status register (tsr) bit corresponding to gr is set and a waveform is output from the corresponding external pin. 1 output, 0 output, or toggle output can be selected by means of a setting in tior. if the appropriate interrupt enable register (tier) setting is made, an interrupt request will be sent to the cpu when a compare-match occurs. to perform internal interrupts by compare-match or compare-match flag polling processing without performing compare-match output, designate the corresponding compare-match output pin as a general i/o pin and select 1 output, 0 output, or toggle output on compare-match in tior. channel 1 and 2 compare-match registers (ocr1, ocr2a to ocr2h) perform compare-match operations unconditionally. however, there are no corresponding output pins. if the appropriate tier setting is made, an interrupt request will be sent to the cpu when a compare-match occurs.
rev. 3.0, 09/04, page 369 of 1086 channel 1 and 2 gr and ocr registers can send a trigger/terminate signal to channel 8 when a compare-match occurs. in this case, settings should be made in the trigger mode register (trgmdr), timer connection register (tcnr), and one-shot pulse terminate register (otr). an example of compare-match operation is shown in figure 11.15. in the example in figure 11.15, channel 1 is activated, and external output is performed with toggle output specified for gr1a, 1 output for gr1b, and 0 output for gr1c. p tcnt1 clock tcnt1 gr1a ? 1c tio1a tio1b tio1c tsr1 imf1a ? 1d channel 8 start/terminate trigger signal cleared by software cleared by software 0085 0084 0083 0082 0081 0081 0080 007f 007e 003e 0040 003f 003e 003d 003c figure 11.15 compare-match operation 11.3.4 input capture function if input capture registers (icr0a to icr0d) and general registers (gr1a to gr1h, gr2a to gr2h, gr3a to gr3d, gr4a to gr4d, gr5a to gr5d, gr11a, gr11b) in channels 1 to 5 and 11 are designated for input capture operation in the timer i/o control registers (tior0 to tior5, tior11), input capture is performed when an edge is input at the corresponding external pins (ti0a to ti0d, tio1a to tio1h, tio2a to tio2h, tio3a to tio3d, tio4a to tio4d, tio5a to tio5d). a free-running counter (tcnt) starts counting up when a setting is made in the timer start register (tstr). when an edge is input at an external pin corresponding to icr or gr, the corresponding timer status register (tsr) bit is set and the tcnt value is transferred to icr or gr. rising-edge, falling-edge, or both-edge detection can be selected. by making the appropriate setting in the interrupt enable register (tier), an interrupt request can be sent to the cpu.
rev. 3.0, 09/04, page 370 of 1086 an example of input capture operation is shown in figure 11.16. in the example in figure 11.16, channel 1 is activated, and input capture operation is performed with both-edge detection specified for tio1a, rising-edge detection for tio1b, and falling-edge detection for tio1c. p tcnt1 clock tcnt1 tio1a ? 1c gr1a gr1b gr1c tsr1 imf1a tsr1 imf1b tsr1 imf1c 567a 567a 0003 cleared by software cleared by software 567e 567d 567c 567b 567a 5679 5678 0005 0004 0003 0003 0003 0002 0001 0000 figure 11.16 input capture operation 11.3.5 one-shot pulse function channel 8 has sixteen down-counters (dcnt8a to dcnt8p) and corresponding external pins (to8a to to8p) which can be used as one-shot pulse output pins. when a value is set beforehand in dcnt and the corresponding bit in the down-counter start register (dstr) is set, dcnt starts counting down, and at the same time 1 is output from the corresponding external pin. when dcnt reaches h'0000 the down-count stops, the corresponding bit in the timer status register (tsr) is set, and 0 is output from the external pin. the corresponding bit in dstr is cleared automatically. by making the appropriate setting in the interrupt enable register (tier), an interrupt request can be sent to the cpu. an example of one-shot pulse operation is shown in figure 11.17. in the example in figure 11.17, h'0005 is set in dcnt and a down-count is started.
rev. 3.0, 09/04, page 371 of 1086 p dstr dst8a dcnt clock to8a dcnt8a tsr8 synchronized with down-counter clock cleared by software 0000 0001 0002 0003 0004 0005 figure 11.17 one-shot pulse output operation 11.3.6 offset one-shot pulse function and output cutoff function by making an appropriate setting in the timer connection register (tcnr), down-counting by channel 8 down-counters (dcnt8a to dcnt8p) can be started using compare-match signals from channel 1 general registers (gr1a to gr1h) or channel 1 and 2 compare-match registers (ocr1, ocr2a to ocr2h). dcnt8a to dcnt8h are connected to channel 1 ocr1 or gr1a to gr1h, and dcnt8i to dcnt8p are connected to channel 2 ocr2a to ocr2h or gr2a to gr2h. this enables one-shot pulse output from the external pin (to8a to to8p) corresponding to dcnt. the down-count can be forcibly stopped by making a setting in the one-shot pulse terminate register (otr). on channel 1, down-count start or termination by a gr or ocr compare-match can be selected with the trigger mode register (trgmdr). making a setting in the timer start register (tstr) starts an up-count by a free-running counter (tcnt) in channel 1 or 2. when tcnt matches gr or ocr while connection is enabled by tcnr, the corresponding dstr is automatically set and dcnt starts counting down. at the same time, 1 is output from the corresponding external pin (to8a to to8p). by making the appropriate setting in the interrupt enable register (tier), an interrupt request can be sent to the cpu. when tcnt1 matches gr or ocr, or tcnt2 matches gr, while channel 8 one-shot pulse termination by a channel 1 or 2 compare-match signal is enabled by otr, the corresponding dstr is automatically cleared and dcnt stops counting down. dcnt is cleared to h'0000 at this time, and must be rewritten before the down-count is restarted. dcnt8i to dcnt8p are connected to the reload register (rldr8), and when the dstr corresponding to dcnt8i to dcnt8p is set, the dcnt8i to dcnt8p counter loads rldr8 before starting the down-count.
rev. 3.0, 09/04, page 372 of 1086 an example of the offset one-shot pulse output function and output cutoff function is shown in figure 11.18. p down-count start trigger (corresponding bit) terminate trigger (ostrg0a-p) first prescaler 1 second prescaler 1 start trigger (ostrg1a-p) down-counter 10a-10p clock down-counter 10a-10p one-shot pulse (toa10-top10) one-shot end interrupt (flag) one-shot end detection signal synchronized with down-counter clock 0000 0003 0004 0005 0006 0007 0008 0009 figure 11.18 offset one-shot pulse output function and output cutoff function operation 11.3.7 interval timer operation the interval interrupt request registers (itvrr1, itvrr2a, itvrr2b) are connected to bits 6 to 9 and 10 to 13 of the channel 0 free-running counter (tcnt0). the itvrr registers are 8-bit registers; the upper 4 bits (itva) are used for a/d converter activation, and the lower 4 bits (itve) are used for interrupt requests. itvrr1 is connected to a/d converter 2 (ad2), itvrr2a to a/d converter 0 (ad0), and itvrr2b to a/d converter 1 (ad1). when the itva bit for the desired timing is set, the a/d converter is activated when the corresponding bit of tcnt0 changes to 1. when the itve bit for the desired timing is set, an interrupt can be requested when the corresponding bit of tcnt0 changes to 1. at this time, the corresponding bit of the timer status register (tsr0) is set. there are four interrupt sources for the respective itvrr registers, but there is only one interrupt vector. to suppress interrupts and a/d converter activation, itvrr bits should be cleared to 0.
rev. 3.0, 09/04, page 373 of 1086 an example of interval timer function operation is shown in figure 11.19. in the example in figure 11.19, tcnt0 is started by setting itve to 1 in itvrr1. p tcnt0 clock internal detection signal ad activation trigger tcnt0 in case of bit 6 detection in case of bit 7 detection 0000007e 00000085 00000084 00000083 00000082 00000081 00000080 0000007f 00000040 0000003f 0000003e 0000003d 0000003c figure 11.19 interval timer function 11.3.8 twin-capture function channel 0 input capture register icr0a, channel 1 offset base register 1 (osbr1), and channel 2 offset base register 2 (osbr2) can be made to perform input capture in response to the same trigger by means of a setting in timer i/o control register 0 (tior0). when tcnt0, tcnt1a, and tcnt2a in channel 0, channel 1, and channel 2 are started by a setting in the timer start register (tstr), and an edge of ti0a input (a trigger signal) is detected, the tcnt1a value is transferred to osbr1, and the tcnt2a value to osbr2. edge detection is as described in section 11.3.4, input capture function. an example of twin-capture operation is shown in figure 11.20. p tcnt1a clock tcnt1a osbr1 567a edge detection signal (from channel 0) 567e 567d 567c 567b 567a 5679 5678 0005 0004 0003 0002 0001 0000 0003 figure 11.20 twin-capture operation
rev. 3.0, 09/04, page 374 of 1086 11.3.9 pwm timer function channels 6 and 7 can be used unconditionally as pwm timers using external pins (to6a to to6d, to7a to to7d). in channels 6 and 7, when the corresponding bit is set in the timer start register (tstr) and the free-running counter (tcnt) is started, the counter counts up until its value matches the corresponding cycle register (cylr). when tcnt matches cylr, it is cleared to h'0001 and starts counting up again from that value. at this time, 1 is output from the corresponding external pin. an interrupt request can be sent to the cpu by setting the corresponding bit in the timer interrupt enable register (tier). if a value has been set in the duty register (dtr), when tcnt matches dtr, 0 is output to the corresponding external pin. if the dtr value is h'0000, the output does not change (0% duty). to set h'0000 to dtr, not write h'0000 directly to dtr but set h'0000 to bfr and then transfer the value to dtr. writing h'0000 directly to dtr may not give a duty of 0%. a duty of 100% is specified by setting dtr = cylr. do not set a value in dtr that will result in the condition dtr > cylr. channels 6 and 7 have buffers (bfr); the bfr value is transferred to dtr when tcnt matches cylr. the duty value written into bfr is reflected in the output value in the cycle following that in which bfr is written to. an example of pwm timer operation is shown in figure 11.21. in the example in figure 11.21, h'0004 is set in channel 6 cylr6a, and h'0002, h'0000 (0%), h'0004 (100%), and h'0001 in bfr6a.
rev. 3.0, 09/04, page 375 of 1086 p str tcnt6a clock tcnt6a cylr6a bfr6a dtr6a to6a tsr6 cmf6a write to bfr6a pwm output does not change for one cycle after activation cycle cycle cycle data = 0000 data = 0004 data = 0001 cycle duty = 100% cycle duty = 0% cleared by software cleared by software cleared by software 0001 0004 0000 0002 0002 0004 0003 0002 0001 0000 0001 0002 0003 0004 0003 0002 0001 0000 0001 0002 0003 0001 0002 0003 0004 0001 0004 0000 * note: * since the retained value is output, the pwm output is not guaranteed for one cycle after activation. figure 11.21 pwm timer operation channel 6 can be used in complementary pwm mode by making a setting in the pwm mode control register (pmdr). on-duty or off-duty can also be selected with a setting in pmdr. when tcnt6 is started by a setting in tstr, it starts counting up. when tcnt6 reaches the cylr6 value, it starts counting down, and on reaching h'000, starts counting up again. the counter status is shown by tsr6. when tcnt6 underflows, an interrupt request can be sent to the cpu by setting the corresponding bit in tier. when tcnt6 matches the duty register (dtr6) value, the output is inverted. the output prior to the match depends on the pmdr setting. when a value including dead time is set in dtr6, a maximum of 4-phase pwm output is possible. data transfer from bfr6 to dtr6 is performed when tcnt6 underflows. an example of channel 6 complementary pwm mode operation is shown in figure 11.22. in the example in figure 11.22, h'0004 is set in channel 6 cylr6a, and h'0002, h'0003, h'0004 (100%), and h'0000 (0%) in bfr6a.
rev. 3.0, 09/04, page 376 of 1086 cycle cycle cycle cleared by software cleared by software cleared by software cleared by software pwm output does not change for one cycle after activation 0002 0002 0003 0004 0000 0003 0004 0000 data=0003 data=0004 data=0000 0004 up up up up up down down down down down 00 01 00 02 00 03 00 04 00 03 00 02 00 01 00 00 00 01 00 02 00 03 00 04 00 03 00 02 00 01 00 00 00 01 00 02 00 03 00 04 00 03 00 02 00 01 00 00 00 01 00 02 00 03 00 04 00 03 00 02 00 01 00 00 00 01 00 02 00 03 00 04 00 03 00 02 00 01 p str6a tcnt6a clock tcnt6a tsr6 ud6a cylr6a write to bfr6a bfr6a dtr6a to6a tsr6 cmf6a note: * since the retained value is output, the pwm output is not guaranteed for one cycle after activation. * cycle duty=100% cycle duty=0% figure 11.22 complementary pwm mode operation 11.3.10 channel 3 to 5 pwm function pwm mode is selected for channels 3 to 5 by setting the corresponding bits to 1 in the timer mode register (tmdr), enabling the channels to operate as pwm timers with the same cycle. in pwm mode, general registers d (gr3d, gr4d, gr5d) are used as cycle registers, and general registers a to c (gr3a to gr3c, gr4a to gr4c, gr5a to gr5c) as duty registers. the external pins (tio3a to tio3c, tio4a to tio4c, tio5a to tio5c) corresponding to the grs used as duty registers are used as pwm outputs. external pins tio3d, tio4d, and tio5d should not be used as timer outputs. the free-running counter (tcnt) is started by making a setting in the timer start register (tstr), and when tcnt reaches the cycle register (gr3d, gr4d, gr5d) value, a compare-match is generated and tcnt starts counting up again from h'0000. at the same time, the corresponding bit is set in the timer status register (tsr) and 1 is output from the corresponding external pin. when tcnt reaches the duty register (gr3a to gr3c, gr4a to gr4c, gr5a to gr5c) value, 0 is output to the external pin. the corresponding status flag is not set. when pwm operation is performed by starting the free-running counter from its initial value of h'0000, pwm output is not performed for one cycle. to perform immediate pwm output, the value in the cycle register must be set in the free-running counter before the counter is started. if pwm operation is performed after setting h'ffff in the cycle register, the cycle register?s compare-match flag and overflow flag will be set simultaneously.
rev. 3.0, 09/04, page 377 of 1086 note that 0% or 100% duty output is not possible in channel 3 to 5 pwm mode. an example of channel 3 to 5 pwm mode operation is shown in figure 11.23. in the example in figure 11.23, h'0008 is set in gr3d, h'0002 is set in gr3a, gr3b, and gr3c, and channel 3 is activated; then, during operation, h'0000 is set in gr3a, gr3b, and gr3c, and output is performed to external pins tioa3 to tioc3. note that 0% duty output is not possible even though h'0000 is set. p tcnt3 clock tcnt3 gr3d gr3a 3c (pulse width) tsr3 tio3a tio3c 0000 cleared by software 0005 0004 0003 0002 0001 0000 0008 0007 0003 0002 0008 0000 0001 0002 0008 0008 cleared by software rewritten by software figure 11.23 channel 3 to 5 pwm mode operation
rev. 3.0, 09/04, page 378 of 1086 11.3.11 event count function and event cycle measurement channel 9 has six 8-bit event counters (ecnt9a to ecnt9f) and corresponding general registers (gr9a to gr9f). each event counter has an external pin (ti9a to ti9f). each ecnt9 operates unconditionally as an event counter. when an edge is input from the external pin, ecnt9 is incremented. when ecnt9 matches the value set in gr9, it is cleared, and then counts up when an edge is again input at the external pin. by making the appropriate setting in the interrupt enable register (tier) beforehand, an interrupt request can be sent to the cpu on compare-match. for ecnt9a to ecnt9d, a trigger can be transmitted to channel 3 when a compare-match occurs. in channel 3, if the channel 9 trigger input is set in the timer i/o control register (tior) and the corresponding bit is set to 1 in the timer start register (tstr), the tcnt3 value is captured in the corresponding general register (gr3a to gr3d) when an ecnt9a to ecnt9d compare-match occurs. this enables the event cycle to be measured. an example of event count operation is shown in figure 11.24. in this example, ecnt9a counts up on both-edge, falling-edge, and rising-edge detection, h'10 is set in gr9a, and a compare- match is generated. an example of event cycle measurement operation is shown in figure 11.25. in this example, gr3a in channel 3 captures tcnt3 in response to a trigger from channel 9. p ti9a gr9a ecnt9a edge detection signal capture trigger to channel 3 tsr9 cmf9a ecnt9a clock 02 00 01 03 10 10 00 05 06 falling edge rising edge rising and falling edges cleared by software figure 11.24 event count operation
rev. 3.0, 09/04, page 379 of 1086 p tcnt3 clock tcnt3 gr3a compare-match trigger (from channel 9) tsr3 imf3a 0003 567a 567e 567d 567c 567b 567a 5679 5678 0005 0004 0003 0002 0001 0000 cleared by software figure 11.25 event cycle measurement operation 11.3.12 channel 10 functions inter-edge measurement function and edge input cessation detection function: 32-bit input capture register 10a (icr10a) and 32-bit output compare register 10a (ocr10a) in channel 10 unconditionally perform input capture and compare-match operations, respectively. these registers are connected to 32-bit free-running counter tcnt10a. when the corresponding bit is set in the timer start register (tstr), the entire channel 10 starts operating. icr10a has an external input pin (ti10), and when an edge is input at this input pin, icr10a captures the tcnt10a value. at this time, tcnt10a is cleared to h'00000001. the captured value is transferred to the read register (rld10c) in the multiplied clock generation block. by making the appropriate setting in the interrupt enable register (tier), an interrupt request can be sent to the cpu. this allows inter-edge measurement to be carried out. when tcnt10a reaches the value set in ocr10a, a compare-match interrupt can be requested. in this way it is possible to detect the cessation of edge input beyond the time set in ocr10a. the input edge from ti10 is synchronized internally; the internal signal is agck. noise cancellation is possible for edges input at ti10 using the timer 10h (tcnt10h) input cancellation function by setting the nce bit in timer control register tcr10. when an edge is input at ti10, tcnt10h starts and input is disabled until it reaches compare-match register ncr10. edge input operation without noise cancellation is shown in figure 11.26, edge input operation with noise cancellation in figure 11.27, and tcnt10a capture operation and compare-match operation in figure 11.28.
rev. 3.0, 09/04, page 380 of 1086 p ti10 agck after internal synchronization 1 after internal synchronization 2 agck operation tcnt clock when falling edge is set when rising edge is set when rising and falling edges are set figure 11.26 edge input operation (without noise cancellation) p ti10 tcnt10h p 10 (clock) ncr10 agck 0 01 1 external edge mask period external edge mask period note: when rising and falling edges are set noise cancellation period agck operation tcnt clock figure 11.27 edge input operation (with noise cancellation)
rev. 3.0, 09/04, page 381 of 1086 tcnt10a tstr1 str10 tcnt10a agck icr10a ocr10a 00000003 00000001 tsr10 cmf10a tsr10 imf10a 00000002 00000000 12345678 55555556 12345677 1234 5678 00000001 55555555 55555556 55555557 capture transfer signal tcnt reset signal cleared by software cleared by software p figure 11.28 tcnt10a capture operation and compare-match operation internally synchronized agck is counted by event count 10b (tcnt10b), and when tcnt10b reaches the value set beforehand in compare-match register 10b (ocr10b), a compare-match occurs, and the compare-match trigger signal is transmitted to channel 0. by setting the corresponding bit in tier, an interrupt request can be sent to the cpu. figure 11.29 shows tcnt10b compare-match operation. p agck tcnt10b clock tcnt10b channel 0 trigger ocr10b tsr10 cmf10b 55 55 00 01 56 cleared by software figure 11.29 tcnt10b compare-match operation
rev. 3.0, 09/04, page 382 of 1086 multiplied clock generation function: the channel 10 16-bit reload counter (tcnt10c, rld10c) and 16-bit free-running counter 10g (tcnt10g) can be used to multiply the interval between edges input from external pin ti10 by 32, 64, 128, or 256. the value captured in icr10a above is multiplied by 1/32, 1/64, 1/128, or 1/256 according to the value set in the timer i/o control register (tior10), and transferred to the reload buffer (rld10c). at the same time, the same value is transferred to 16-bit reload counter 10c (tcnt10c) and a down-count operation is started. when this counter reaches h'0001, the value is read automatically from rld10c and the down-count operation is repeated. when this reload occurs, a multiplied clock signal (agck1) is generated. agck1 is converted to a corrected clock (agckm) by the multiplied clock correction function described in the following section. channel 10 can also perform compare-match operation by means of the multiplied clock (agck1) using general register 10g (gr10g) and 16-bit free-running counter 10g (tcnt10g). tcnt10g is incremented unconditionally by agck1. by making the appropriate setting in the interrupt enable register (tier), an interrupt request can be sent to the cpu when tcnt10g and gr10g match. the timing of this interrupt can be selected with the ireg bit in tier as either on occurrence of the compare-match or on input of the first ti10 edge after the compare-match. tcnt10c operation is shown in figure 11.30, and tcnt10g compare-match operation in figure 11.31.
rev. 3.0, 09/04, page 383 of 1086 p str10 agck icr10a rld10c write enable signal tcnt10c shifter output rld10c rld10c load signal agck1 rlden note: in case of multiplication factor of 32 initial value set by software not loaded when rlden = 1 rlden set to 0 by software rlden set to 1 by software 1ck 1ck 00000020 00000000 0000 0002 0001 0001 0001 0001 0001 0001 0002 0002 0001 0002 0001 0001 figure 11.30 tcnt10c operation p agck agck1 tcnt10g tsr10 cmf10g gr10g tsr10 cmf10g 0000 0034 0000 cleared by agck 0001 0036 0035 when ireg = 1 0034 0002 0001 write by software when ireg = 0 figure 11.31 tcnt10g compare-match operation
rev. 3.0, 09/04, page 384 of 1086 multiplied clock correction function: channel 10?s three 16-bit correction counters (tcnt10d, tcnt10e, tcnt10f) and correction counter clear register (tcclr10) have a correction function that makes the interval between edges input from ti10 the frequency multiplication value set in tior10. when agck is input, the value in tcnt10d multiplied by the multiplication factor set in tior10 is transferred to tcnt10e. at the same time, tcnt10d is incremented. tcnt10e counts up on agck1. for example, tcnt10e loads tcnt10d on agck, and counts up again on agck1. using the counter correction select bit (ccs) in tior10, it is possible to select whether or not tcnt10e is halted when tcnt10d = tcnt10e. tcnt10f has the peripheral clock (p ) as its input and is constantly compared with tcnt10e. when the tcnt10f value is smaller than that in tcnt10e, tcnt10f is incremented and outputs a corrected multiplied clock signal (agckm). when the tcnt10f value exceeds the tcnt10e value, no count-up operation is performed. agckm is output to the channel 1 to 5 free-running counters (tcnt1 to tcnt5). channel 10 also has a correction counter clear register (tcclr10). the correction counters (tcnt10d, tcnt10e, tcnt10f) and channel 1 and 2 free-running counters (tcnt1 and tcnt2) can be cleared when tcnt10f reaches the value set in tcclr10. tcnt10d operation is shown in figure 11.32, tcnt10e operation in figure 11.33, tcnt10f operation (at startup) in figure 11.34, tcnt10f operation (end of cycle, acceleration, deceleration) in figure 11.35, and tcnt10f operation (end of cycle, steady-state) in figure 11.36. p str10 agck tcnt10d clock shifter output tcnt10d 02 01 00 03 0000 note: in case of multiplication factor of 32 0060 0040 0020 figure 11.32 tcnt10d operation
rev. 3.0, 09/04, page 385 of 1086 p str10 agck tcnt10e valid agck1 tcnt10e tcnt10d (shift amount) initial value load corrected value load corrected value load note: in case of multiplication factor of 32 00 44 00 43 00 42 00 41 0039 0040 0060 0038 0022 0021 0020 0023 0004 0022 0003 0002 0001 0040 0020 0000 0024 00 00 figure 11.33 tcnt10e operation p str10 agck tcnt10e tcnt10e clock tcnt10f agckm tcnt clock operating on agckm tcnt1, tcnt2 reset trigger tcnt1, tcnt2 tcnt10d 0024 note: multiplication factor of 32, tcclr10 = h'0080 same value as cycle register set by software 0027 0027 0026 0026 0025 0025 0024 0023 0022 0021 0020 0024 0022 0023 0004 0003 0002 0001 0000 0023 0022 0004 0003 0002 0001 0080 0000 0001 0002 0003 0022 0023 0024 0025 0026 02 01 00 figure 11.34 tcnt10f operation (at startup)
rev. 3.0, 09/04, page 386 of 1086 005a 0063 00 62 0064 0065 0066 0002 0080 00 01 0003 0076 0077 0078 0079 007a 03 04 str10 agck tcnt10e tcnt10e clock tcnt10f agckm tcnt clock operating on agckm tcnt1, tcnt2 reset trigger tcnt1, tcnt2 tcnt10d 0060 005a 0061 0062 0063 0064 0065 0066 0076 0077 0078 0079 007a 00 00 0001 0002 0003 0063 00 62 005a 0064 0065 00 66 0002 0000 00 01 0003 0076 0077 0078 0079 007a 01 00 p note: multiplication factor of 32, tcclr10 = h'0080 cleared to h'00 by software figure 11.35 tcnt10f operation (end of cycle, acceleration, deceleration)
rev. 3.0, 09/04, page 387 of 1086 005a 005a 0063 00 62 0064 0065 0066 0002 0001 0080 0003 007e 007f 03 04 str10 agck tcnt10e tcnt10e clock tcnt10f agckm tcnt clock operating on agckm tcnt1, tcnt2 reset trigger tcnt1, tcnt2 tcnt10d 0060 005a 0061 0062 0063 0064 0065 0066 007e 007f 0080 0081 0082 00 00 0001 0002 0003 0063 00 62 0064 0065 00 66 0002 007e 007f 0000 0001 01 00 p note: multiplication factor of 32, tcclr10 = h'0080 set to h'00 by software figure 11.36 tcnt10f operation (end of cycle, steady-state)
rev. 3.0, 09/04, page 388 of 1086 11.4 interrupts the atu has 75 interrupt sources of five kinds: input capture interrupts, compare-match interrupts, overflow interrupts, underflow interrupts, and interval interrupts. 11.4.1 status flag setting timing imf (icf) setting timing in input capture: when an input capture signal is generated, the imf bit and icf bit are set to 1 in the timer status register (tsr), and the tcnt value is simultaneously transferred to the corresponding gr, icr, and osbr. the timing in this case is shown in figure 11.37. in the example in figure 11.37, a signal is input from an external pin, and input capture is performed on detection of a rising edge. ck input capture input tcnt n gr (icr) n internal input capture signal interrupt status flag imf (icf) interrupt request signal imi (ici) t tics (input capture input setup time) figure 11.37 imf (icf) setting timing in input capture
rev. 3.0, 09/04, page 389 of 1086 imf (icf) setting timing in compare-match: the imf bit and cmf bit are set to 1 in the timer status register (tsr) by the compare-match signal generated when the general register (gr) output compare register (ocr), or cycle register (cylr) value matches the timer counter (tcnt) value. the compare-match signal is generated in the last state of the match (when the matched tcnt count value is updated). the timing in this case is shown in figure 11.38. ck tcnt gr (ocr, cylr) n n n + 1 tcnt input clock compare-match signal interrupt status flag imf (cmf) interrupt request signal imi (cmi) figure 11.38 imf (cmf) setting timing in compare-match
rev. 3.0, 09/04, page 390 of 1086 ovf setting timing in overflow: when tcnt overflows (from h'ffff to h'0000, or from h'ffffffff to h'00000000), the ovf bit is set to 1 in the timer status register (tsr). the timing in this case is shown in figure 11.39. ck tcnt h'ffff h'0000 tcnt input clock overflow signal interrupt status flag ovf interrupt request signal ovi figure 11.39 ovf setting timing in overflow
rev. 3.0, 09/04, page 391 of 1086 osf setting timing in underflow: when a down-counter (dcnt) counts down from h'0001 to h'0000 on dcnt input clock input, the osf bit is set to 1 in the timer status register (tsr) when the next dcnt input clock pulse is input (when underflow occurs). however, when dcnt is h'0000, it remains unchanged at h'0000 no matter how many dcnt input clock pulses are input. when dcnt is cleared by means of the one-shot pulse function, the osf bit is cleared when the next dcnt input clock is input. the timing in this case is shown in figure 11.40. ck dcnt dcnt input clock underflow signal interrupt status flag osf interrupt request signal osi h'0001 h'0000 h'0000 figure 11.40 osf setting timing in underflow
rev. 3.0, 09/04, page 392 of 1086 timing of iif setting by interval timer: when 1 is generated by anding the rise of bit 10?13 in free-running counter tcnt0l with bit itve0?itve3 in the interval interrupt request register (itvrr), the iif bit is set to 1 in the timer status register (tsr). the timing in this case is shown in figure 11.41. tcnt0 value n in the figure is the counter value when tcnt0l bit 6?13 changes to 1. (for example, n = h'00000400 in the case of bit 10, h'00000800 in the case of bit 11, etc.) ck tcnt0 tcnt input clock internal interval signal interrupt status flag iif interrupt request signal n ? 1 n figure 11.41 timing of iif setting timing by interval timer
rev. 3.0, 09/04, page 393 of 1086 11.4.2 status flag clearing clearing by cpu program: the interrupt status flag is cleared when the cpu writes 0 to the flag after reading it while set to 1. the procedure and timing in this case are shown in figure 11.42. start read 1 from tsr write 0 to tsr interrupt status flag cleared ck tsr address internal write signal address interrupt status flag imf, icf, cmf, ovf, osf, iif interrupt request signal tsr write cycle t1 t2 figure 11.42 procedure and timing for clearing by cpu program
rev. 3.0, 09/04, page 394 of 1086 clearing by dmac: the interrupt status flag (icf0a to icf0d, cmf6a to cmf6d, cmf7a to cmf7d) is cleared automatically during data transfer when the dmac is activated by input capture or compare-match. the procedure and timing in this case are shown in figure 11.43. start interrupt status flag cleared during data transfer ck clear request signal from dmac interrupt status flag icf0b, cmf6 interrupt status flag clear signal interrupt request signal activate dmac figure 11.43 procedure and timing for clearing by dmac
rev. 3.0, 09/04, page 395 of 1086 11.5 cpu interface 11.5.1 registers requiring 32-bit access free-running counters 0 and 10a (tcnt0, tcnt10a), input capture registers 0a to 0d and 10a (icr0a to icr0d, icr10a), and output compare register 10a (ocr10a) are 32-bit registers. as these registers are connected to the cpu via an internal 16-bit data bus, a read or write (read only, in the case of icr0a to icr0d and icr10a) is automatically divided into two 16-bit accesses. figure 11.44 shows a read from tcnt0, and figure 11.45 a write to tcnt0. when reading tcnt0, in the first read the tcnt0h (upper 16-bit) value is output to the internal data bus, and at the same time, the tcnt0l (lower 16-bit) value is output to an internal buffer register. then, in the second read, the tcnt0l (lower 16-bit) value held in the internal buffer register is output to the internal data bus. when writing to tcnt0, in the first write the upper 16 bits are output to an internal buffer register. then, in the second write, the lower 16 bits are output to tcnt0l, and at the same time, the upper 16 bits held in the internal buffer register are output to tcnt0h to complete the write. the above method performs simultaneous reading and simultaneous writing of 32-bit data, preventing contention with an up-count. 1st read operation 2nd read operation cpu cpu internal data bus hh internal data bus l l l bus interface internal buffer register tcnt0h tcnt0l tcnt0h tcnt0l module data bus bus interface internal buffer register module data bus module data bus figure 11.44 read from tcnt0
rev. 3.0, 09/04, page 396 of 1086 1st write operation 2nd write operation cpu internal data bus h h lh bus interface internal buffer register tcnt0h tcnt0l tcnt0h tcnt0l module data bus cpu internal data bus l bus interface internal buffer register module data bus module data bus figure 11.45 write to tcnt0
rev. 3.0, 09/04, page 397 of 1086 11.5.2 registers permitting 8-bit, 16-bit, or 32-bit access timer registers 1, 2, and 3 (tstr1, tstr2, tstr3) are 8-bit registers. as these registers are connected to the cpu via an internal 16-bit data bus, a simultaneous 32-bit read or write access to tstr1, tstr2, and tstr3 is automatically divided into two 16-bit accesses. figure 11.46 shows a read from tstr, and figure 11.47 a write to tstr. when reading tstr, in the first read the tstr1 and tstr2 (upper 16-bit) value is output to the internal data bus. then, in the second read, the tstr3 (lower 16-bit) value is output to the internal data bus. when writing to tstr, in the first write the upper 16 bits are written to tstr1 and tstr2. then, in the second write, the lower 16 bits are written to tstr3. note that, with the above method, in a 32-bit write the write timing is not the same for tstr1/tstr2 and tstr3. for information on 8-bit and 16-bit access, see section 11.5.4, 8-bit or 16-bit accessible registers. 1st read operation 2nd read operation cpu cpu internal data bus hh internal data bus l l bus interface tstr2 tstr1 tstr3 tstr2 tstr1 tstr3 module data bus bus interface module data bus figure 11.46 read from tstr1, tstr2, and tstr3
rev. 3.0, 09/04, page 398 of 1086 1st write operation 2nd write operation cpu internal data bus h h l bus interface tstr2 tstr1 tstr3 tstr2 tstr1 tstr3 module data bus cpu internal data bus l bus interface module data bus figure 11.47 write to tstr1, tstr2 and tstr3 11.5.3 registers requiring 16-bit access the free-running counters (tcnt; but excluding tcnt0, tcnt10a, tcnt10b, tcnt10d, and tcnt10h), the general registers (gr; but excluding gr9a to gr9d), down-counters (dcnt), offset base register (osbr), cycle registers (cylr), buffer registers (bfr), duty registers (dtr), timer connection register (tcnr), one-shot pulse terminate register (otr), down-count start register (dstr), output compare registers (ocr: but excluding ocr10b), reload registers (rldr8, rld10c), correction counter clear register (tcclr10), timer interrupt enable register (tier), and timer status register (tsr) are 16-bit registers. these registers are connected to the cpu via an internal 16-bit data bus, and can be read or written (read only, in the case of osbr) a word at a time. figure 11.48 shows the operation when performing a word read or write access to tcnt1a. cpu internal data bus tcnt1a module data bus bus interface figure 11.48 tcnt1a read/write operation
rev. 3.0, 09/04, page 399 of 1086 11.5.4 8-bit or 16-bit accessible registers the timer control registers (tcr1a, tcr1b, tcr2a, tcr2b, tcr6a, tcr6b, tcr7a, tcr7b), timer i/o control registers (tior1a to tior1d, tior2a to tior2d, tior3a, tior3b, tior4a, tior4b, tior5a, tior5b), and the timer start register (tstr1, tstr2, tstr3) are 8-bit registers. these registers are connected to the cpu with the upper 8 bits or lower 8 bits of the internal 16-bit data bus, and can be read or written a byte at a time. in addition, a pair of 8-bit registers for which only the least significant bit of the address is different, such as timer i/o control register 1a (tior1a) and timer i/o control register 1b (tior1b), can be read or written in combination a word at a time. figures 11.49 and 11.50 show the operation when performing individual byte read or write accesses to tior1a and tior1b. figure 11.51 shows the operation when performing a word read or write access to tior1a and tior1b simultaneously. cpu internal data bus only upper 8 bits used only upper 8 bits used tior1b tior1a module data bus bus interface figure 11.49 byte read/write access to tior1b cpu internal data bus only lower 8 bits used only lower 8 bits used tior1b tior1a module data bus bus interface figure 11.50 byte read/write access to tior1a cpu internal data bus tior1b tior1a module data bus bus interface figure 11.51 word read/write access to tior1a and tior1b
rev. 3.0, 09/04, page 400 of 1086 11.5.5 registers requiring 8-bit access the timer mode register (tmdr), prescaler register (pscr), timer i/o control registers (tior0, tior10, tior11), trigger mode register (trgmdr), interval interrupt request register (itvrr), timer control registers (tcr3, tcr4, tcr5, tcr8, tcr9a to tcr9c, tcr10, tcr11), pwm mode register (pmdr), reload enable register (rldenr), free-running counters (tcnt10b, tcnt10d, tcnt10h), event counter (ecnt), general registers (gr9a to gr9f), output compare register (ocr10b), and noise canceler register (ncr) are 8-bit registers. these registers are connected to the cpu with the upper 8 bits of the internal 16-bit data bus, and can be read or written a byte at a time. figure 11.52 shows the operation when performing individual byte read or write accesses to itvrr1. cpu internal data bus only upper 8 bits used only upper 8 bits used itvrr1 module data bus bus interface figure 11.52 byte read/write access to itvrr1 11.6 sample setup procedures sample setup procedures for activating the various atu-ii functions are shown below. sample setup procedure for input capture: an example of the setup procedure for input capture is shown in figure 11.53.
rev. 3.0, 09/04, page 401 of 1086 select counter clock 1 set port-atu-ii connection 2 set input waveform edge detection 3 start counter 4 input capture operation start 1. select the first-stage counter clock ' in prescaler register (pscr) and the second-stage counter clock " with the cksel bit in the timer control register (tcr). when selecting an external clock, also select the external clock edge type with the ckeg bit in tcr. 2. set the port control register, corresponding to the port for signal input as the input capture trigger, to atu input capture input. 3. select rising edge, falling edge, or both edges as the input capture signal input edge(s) with the timer i/o control register (tior). if necessary, a timer interrupt request can be sent to the cpu on input capture by making the appropriate setting in the interrupt enable register (tier). in channel 0, setting the dmac allows dmac activation to be performed. 4. set the corresponding bit to 1 in the timer start register (tstr) to start the free-running counter (tcnt) for the relevant channel. note: when input capture occurs, the counter value is always captured, irrespective of free-running counter (tcnt) activation. figure 11.53 sample setup procedure for input capture
rev. 3.0, 09/04, page 402 of 1086 sample setup procedure for waveform output by output compare-match: an example of the setup procedure for waveform output by output compare-match is shown in figure 11.54. select counter clock 1 set port-atu-ii connection 2 select waveform output mode 3 set output timing 4 start counter 5 waveform output start 1. select the first-stage counter clock ' in prescaler register (pscr), and the second-stage counter clock " with the cksel bit in the timer control register (tcr). when selecting an external clock, also select the external clock edge type with the ckeg bit in tcr. 2. set the port control register corresponding to the waveform output port to atu output compare-match output. also set the corresponding bit to 1 in the port io register to specify the output attribute for the port. 3. select 0, 1, or toggle output for output compare-match output with the timer i/o control register (tior). if necessary, a timer interrupt request can be sent to the cpu on output compare-match by making the appropriate setting in the interrupt enable register (tier). 4. set the timing for compare-match generation in the atu general register (gr) corresponding to the port set in (2). 5. set the corresponding bit to 1 in the timer start register (tstr) to start the free-running counter (tcnt). waveform output is performed from the relevant port when the tcnt value and gr value match. figure 11.54 sample setup procedure for waveform output by output compare-match
rev. 3.0, 09/04, page 403 of 1086 sample setup procedure for channel 0 input capture triggered by channel 10 compare- match: an example of the setup procedure for compare-match signal transmission is shown in figure 11.55. set compare-match 1 set tcr10 2 start counter 3 signal transmission start 1. set the timing for compare-match generation in the channel 10 output compare register (ocr10b). 2. set the trg0den bit to 1 in the channel 10 timer control register (tcr10). 3. set the corresponding bit to 1 in the timer start register (tstr) to start the channel 10 free-running counter (tcnt10b). on compare-match between tcnt10 and ocr10b, the compare-match signal is transmitted to channel 0 as the channel 0 icr0d input capture signal. figure 11.55 sample setup procedure for compare-match signal transmission
rev. 3.0, 09/04, page 404 of 1086 sample setup procedure for one-shot pulse output: an example of the setup procedure for one-shot pulse output is shown in figure 11.56. select counter clock 1 set port-atu-ii connection 2 set pulse width 3 start down-count 4 one-shot pulse output start 1. set the first-stage counter clock ' in prescaler register 1 (pscr1), and select the second-stage counter clock " with the cksel bit in timer control register8 tcr8. 2. set port k control registers h and l (pkcrh, pkcrl) corresponding to the waveform output port to atu one-shot pulse output. also set the corresponding bit to 1 in the port k io register (pkior) to specify the output attribute. 3. set the one-shot pulse width in the down-counter (dcnt) corresponding to the port set in (2). if necessary, a timer interrupt request can be sent to the cpu when the down- counter underflows by making the appropriate setting in the interrupt enable register (tier8). 4. set the corresponding bit (dst8a to dst8p) to 1 in the down-count start register (dstr) to start the down-counter (dcnt). figure 11.56 sample setup procedure for one-shot pulse output
rev. 3.0, 09/04, page 405 of 1086 sample setup procedure for offset one-shot pulse output/cutoff operation: an example of the setup procedure for offset one-shot pulse output is shown in figure 11.57. select counter clock 1 set port-atu-ii connection 2 set pulse width 3 set offset width 4 set offset operation 5 start count 6 offset one-shot pulse output start 1. set the first-stage counter clock ' in prescaler register 1 (pscr1), and select the second-stage counter clock " with the cksel bit in the timer control register (tcr1, tcr2, tcr8). 2. set port k control registers h and l (pkcrh, pkcrl) corresponding to the waveform output port to atu one-shot pulse output. also set the corresponding bit to 1 in the port k io register (pkior) to specify the output attribute 3. set the one-shot pulse width in the down-counter (dcnt) corresponding to the port set in (2). if necessary, a timer interrupt request can be sent to the cpu when the down- counter underflows by making the appropriate setting in the interrupt enable register (tier8). 4. set the offset width in the channel 1 or 2 general register (gr1a ? gr1h, gr2a ? gr2h) connected to the down- counter (dcnt) corresponding to the port set in (2), and in the output compare register (ocr1, ocr2a ? ocr2h). set the timer i/o control register (tior1a ? tior1d, tior2a ? tior2d) to the compare-match enabled state. 5. set the start/terminate trigger by means of the trigger mode register (trgmdr), timer connection register (tcnr), and one-shot pulse terminate register (otr), so that it corresponds to the port set in (2). 6. set the corresponding bit to 1 in the timer start register (tstr) to start the channel 1 or 2 free-running counter (tcnt1, tcnt2). when the tcnt value and gr value or ocr value match, the corresponding dcnt starts counting down or is forcibly cleared, and one-shot pulse output is performed. figure 11.57 sample setup procedure for offset one-shot pulse output
rev. 3.0, 09/04, page 406 of 1086 sample setup procedure for interval timer operation: an example of the setup procedure for interval timer operation is shown in figure 11.58. select counter clock 1 set interval 2 start counter 3 interrupt request to cpu or start of a/d sampling start 1. set the first-stage counter clock ' in prescaler register 1 (pscr1). 2. set the itve bit to be used in the interval interrupt request register (itvrr) to 1. an interrupt request can be sent to the cpu when the corresponding bit changes to 1 in the channel 0 free-running counter (tcnt0). to start a/d converter sampling, set the itva bit to be used in itvrr to 1. 3. set bit 0 to 1 in the timer start register (tstr) to start tcnt0. figure 11.58 sample setup procedure for interval timer operation
rev. 3.0, 09/04, page 407 of 1086 sample setup procedure for pwm timer operation (channels 3 to 5 ): an example of the setup procedure for pwm timer operation (channels 3 to 5 ) is shown in figure 11.59. select counter clock 1 set port-atu-ii connection 2 set pwm timer 3 set gr 4 start count 5 pwm waveform output start 1. set the first-stage counter clock ' in prescaler register 1 (pscr1), and select the second-stage counter clock " with the cksel bit in the timer control register (tcr). when selecting an external clock, at the same time select the external clock edge type with the ckeg bit in tcr. 2. set the port control registers (pxcrh, pxcrl) corresponding to the waveform output port to atu output compare-match output. also set the corresponding bit to 1 in the port io register (pxior) to specify the output attribute. 3. set bit t3pwm ? t5pwm in the timer mode register (tmdr) to pwm mode. when pwm mode is set, the timer operates in pwm mode irrespective of the timer i/o control register (tior) contents, and general registers (gr3a to gr3d, gr4a to gr4d, gr5a to gr5d) can be written to. 4. the gr3a ? gr3c, gr4a ? gr4c, and gr5a ? gr5c atu general registers are used as duty registers (dtr), and the gr3d, gr4d, and gr5d atu general registers as cycle registers (cylr). set the pwm waveform output 0 output timing in dtr, and the pwm waveform output 1 output timing in cylr. also, if necessary, interrupt requests can be sent to the cpu at the 0/1 output timing by making a setting in the timer interrupt enable register (tier). 5. set the corresponding bit to 1 in the timer start register (tstr) to start the free-running counter (tcnt) for the relevant channel. figure 11.59 sample setup procedure for pwm timer operation (channels 3 to 5)
rev. 3.0, 09/04, page 408 of 1086 sample setup procedure for pwm timer operation (channels 6 and 7): an example of the setup procedure for pwm timer operation (channels 6 and 7) is shown in figure 11.60. select counter clock 1 set port-atu-ii connection 2 set cylr, bfr, dtr 3 start count 4 pwm waveform output start 1. set the first-stage counter clock ' in prescaler register 2 and 3 (pscr2, pscr3), and select the second-stage counter clock " with the cksel bit in the timer control register (tcr6a, tcr6b, tcr7a, tcr7b). 2. set the port b control register l (pbcrl) corresponding to the waveform output port to atu pwm output. also set the corresponding bit to 1 in the port b io register (pbior) to specify the output attribute. 3. set pwm waveform output 1 output timing in the cycle register (cylr6a to cylr6d, cylr7a to cylr7d), and set the pwm waveform output 0 output timing in the buffer register (bfr6a to bfr6d, bfr7a to bfr7d) and duty register (dtr6a to dtr6d, dtr7a to dtr7d). if necessary, an interrupt request can be sent to the cpu on a compare-match between the cylr value and the free- running counter (tcnt) value by making the appropriate setting in the interrupt enable register (tiere). in addition, setting the dmac allows dmac activation to be performed. 4. set the corresponding bit to 1 in the timer start register (tstr) to start the tcnt counter for the relevant channel. notes: 1. do not make a setting in dtr after the counter is started. use bfr to make a dtr setting. 2. 0% duty is specified by setting h'0000 in the duty register (dtr), and 100% duty is specified by setting buffer register (bfr) = cycle register (cylr). do not set bfr > cylr. figure 11.60 sample setup procedure for pwm timer operation (channels 6 and 7)
rev. 3.0, 09/04, page 409 of 1086 sample setup procedure for event counter operation: an example of the setup procedure for event counter operation is shown in figure 11.61. set number of events 1 set port-atu-ii connection 2 select counter clock 3 start event input 4 event counter operation start 1. set the number of events to be counted in a general register (gr9a to gr9d). also, if necessary, an interrupt request can be sent to the cpu upon compare-match by making a setting in the timer interrupt enable register (tier). 2. set the port control register, corresponding to the port for signal input to the event counter, to atu event counter input. 3. select the event counter count edge with the egsel bits in the channel 9 timer control register (tcr9a to tcr9c). 4. input a signal to the event counter input pin. figure 11.61 sample setup procedure for event counter operation
rev. 3.0, 09/04, page 410 of 1086 sample setup procedure for channel 3 input capture triggered by channel 9 compare- match: an example of the setup procedure for compare-match signal transmission is shown in figure 11.62. set port-atu-ii commection 1 set input capture 2 start counter 4 start event input 5 select compare-match 3 input capture operation start 1. set the port control register, corresponding to the port for signal input to the event counter, to atu event counter input. 2. set the channel 3 timer i/o control register (tior3a, tior3b), and select the input capture disable setting for the general registers (gr3a to gr3d). input from pins tio3a to tio3d is masked. 3. select the event counter count edge with the egsel bits in the channel 9 timer control register (tcr9a, tcr9b), and set the trg3xen bit to 1. set the timing for capture in the general register (gr9a to gr9d). 4. set bit str3 to 1 in the timer start register (tstr) to start the channel 3 free-running counter (tcnt3). 5. input a signal to the event counter input pin. note: an interrupt request can be sent to the cpu upon channel 9 compare-match by making a setting in the timer interrupt enable register (tier), but an interrupt request cannot be sent to the cpu upon channel 3 input capture. figure 11.62 sample setup procedure for compare-match signal transmission
rev. 3.0, 09/04, page 411 of 1086 sample setup procedure for channel 10 missing-teeth detection: an example of the setup procedure for missing-teeth detection is shown in figure 11.63. set port-atu-ii connection 1 select counter clock 2 set missing-teeth timing 4 start counter 5 set compare-match 3 interrupt requests to cpu start 1. set port b control register h (pbcrh) or port l control register l (plcrl), corresponding to the port for input of the external signal (missing-teeth signal), to atu edge input (ti10). 2. set 1st-stage counter clock ' in prescaler register 4 (pscr4). set the external input (ti10) cycle multiplication factor with the pim bits in timer i/o control register 10 (tior10), and enable reload register 10c (rld10c) updating with the rlden bit. select the external input edge type with the ckeg bits in timer control register 10 (tcr10). 3. set general register 10g (gr10g) to the compare-match function with bit io10g in tior10. also, an interrupt request can be sent to the cpu upon compare-match by making a setting in interrupt enable register 10 (tier10). 4. set the timing for compare-match generation in gr10g according to the multiplication factor and number of missing- teeths in the missing-teeth interval set in (1). 5. set the corresponding bit to 1 in timer start register 1 (tstr1) to start the channel 10 count. a compare-match occurs when the values in free-running counter 10g (tcnt10g) and gr10g match. note: the tcnt10g counter clock is generated according to the external input edge interval and multiplication factor selected in (1), and the counter is cleared to h'0000 by an external input edge. figure 11.63 sample setup procedure for missing-teeth detection
rev. 3.0, 09/04, page 412 of 1086 11.7 usage notes note that the kinds of operation and contention described below occur during atu operation. contention between tcnt write and clearing by compare-match: with channel 3 to 7 free- running counters (tcnt3 to tcnt5, tcnt6a to tcnt6d, tcnt7a to tcnt7d), if a compare-match occurs in the t2 state of a cpu write cycle when counter clearing by compare- match has been set, or when pwm mode is used, the write to tcnt has priority and tcnt clearing is not performed. the compare-match remains valid, and writing of 1 to the interrupt status flag and waveform output to an external destination are performed in the same way as for a normal compare-match. the timing in this case is shown in figure 11.64. p t1 address tcnt address cpu write value internal write signal compare-match signal counter clear signal tcnt interrupt status flag external output signal (1 output) t2 figure 11.64 contention between tcnt write and clear
rev. 3.0, 09/04, page 413 of 1086 contention between tcnt write and increment: if a write to a channel 0 to 11 free-running counter (tcnt0, tcnt1a, tcnt1b, tcnt2a, tcnt2b, tcnt3 to tcnt5, tcnt6a to tcnt6d, tcnt7a to tcnt7d, tcnt10a to tcnt10h, tcnt11), down-counter (dcnt8a to dcnt8p), or event counter 9 (ecnt9a to ecnt9f) is performed while that counter is counting up or down, the write to the counter has priority and the counter is not incremented or decremented. the timing in this case is shown in figure 11.65. in this example, the cpu writes h'5555 at the point at which tcnt is to be incremented from h'1001 to h'1002. p t1 tcnt address 5555 (cpu write value) internal write signal tcnt input clock address tcnt t2 1001 5556 figure 11.65 contention between tcnt write and increment
rev. 3.0, 09/04, page 414 of 1086 contention between tcnt write and counter clearing by overflow: with channel 0 to 5 and 11 free-running counters (tcnt0, tcnt1a, tcnt1b, tcnt2a, tcnt2b, tcnt3 to tcnt5, tcnt11), if overflow occurs in the t2 state of a cpu write cycle, the write to tcnt has priority and tcnt is not cleared. writing of 1 to the interrupt status flag (ovf) due to the overflow is performed in the same way as for normal overflow. the timing in this case is shown in figure 11.66. in this example, h'5555 is written at the point at which tcnt overflows. p t1 tcnt address 5555 (cpu write value) internal write signal overflow signal interrupt status flag (ovf) tcnt input clock address tcnt t2 ffff 5556 figure 11.66 contention between tcnt write and overflow
rev. 3.0, 09/04, page 415 of 1086 contention between interrupt status flag setting by interrupt generation and clearing: if an event such as input capture/compare-match or overflow/underflow occurs in the t2 state of an interrupt status flag 0 write cycle by the cpu, clearing by the 0 write has priority and the interrupt status flag is cleared. the timing in this case is shown in figure 11.67. p t1 tsr address n + 1 n 0 written to tsr n internal write signal compare-match signal interrupt status flag imf address tcnt gr t2 tsr write cycle figure 11.67 contention between interrupt status flag setting by compare-match and clearing
rev. 3.0, 09/04, page 416 of 1086 contention between dtr write and bfr value transfer by buffer function: in channels 6 and 7, if there is contention between transfer of the buffer register (bfr) value to the corresponding duty register (dtr) due to a cycle register (cylr) compare-match, and a write to dtr by the cpu, the cpu write value is written to dtr. figure 11.68 shows an example in which contention arises when the bfr value is h'aaaa and the value to be written to dtr is h'5555. p dtr address h'5555 written to dtr h'aaaa h'5555 internal write signal compare-match signal address dtr bfr figure 11.68 contention between dtr write and bfr value transfer by buffer function
rev. 3.0, 09/04, page 417 of 1086 contention between interrupt status flag clearing by dmac and setting by input capture/compare-match: if a clear request signal is generated by the dmac when the interrupt status flag (icf0a to icf0d, cmf6a to cmf6d, cmf7a to cmf7d) is set by input capture (icr0a to icr0d) or compare-match (cylr6a to cylr6d, cylr7a to cylr7d), clearing by the dmac has priority and the interrupt status flag is not set. the timing in this case is shown in figure 11.69. p dmac clear request signal input capture/ compare-match signal interrupt status flag icf0a to icf0d, cmf6a to cmf6d, cmf7a to cmf7d interrupt status flag clear signal figure 11.69 contention between interrupt status flag clearing by dmac and setting by input capture/compare-match
rev. 3.0, 09/04, page 418 of 1086 halting of a down-counter by the cpu: a down-counter (dcnt) can be halted by writing h'0000 to it. the cpu cannot write 0 directly to the down-count start register (dstr); instead, by setting dcnt to h'0000, the corresponding dstr bit is cleared to 0 and the count is stopped. however, the osf bit in the timer status register (tsr) is set when dcnt underflows. note that when h'0000 is written to dcnt, the corresponding dstr bit is not cleared to 0 immediately; it is cleared to 0, and the down-counter is stopped, when underflow occurs following the h'0000 write. the timing in this case is shown in figure 11.70. p h'0000 written to dcnt h'0000 h'0000 n internal write signal dcnt dcnt input clock port output (one-shot pulse) tsr dstr figure 11.70 halting of a down-counter by the cpu
rev. 3.0, 09/04, page 419 of 1086 input capture operation when free-running counter is halted: in channels 0 to 5, channel 10, or channel 11, if input capture setting is performed and a trigger signal is input from the input pin, the tcnt value will be transferred to the corresponding general register (gr) or input capture register (icr) irrespective of whether the free-running counter (tcnt) is running or halted, and the imf or icf bit will be set in the timer status register (tsr). the timing in this case is shown in figure 11.71. p n internal input capture signal interrupt status flag imf (icf) timer status register tsr tcnt gr (icr) n figure 11.71 input capture operation before free-running counter is started
rev. 3.0, 09/04, page 420 of 1086 contention between dcnt write and counter clearing by underflow: if an underflow occurs in the t2 state of the channel 8 down-counter (dcnt8a to dcnt8p) write cycle by the cpu and the dcnt is stopped, the retention of the h?0000 value has priority and the write to the dcnt by the cpu is not performed. setting the status flag (osf) to 1 at the underflow timing is performed in the same way as for a normal underflow. the timing in this case is shown in figure 11.72. in this example, a write of h'5555 to dcnt is attempted at the same time as dcnt underflows. note: in the sh7055, a write to dcnt from the cpu is not attempted, but retention of h?0000 takes precedence. note that its operation is different. p t1 dcnt address internal write signal dcnt input clock underflow signal address 5555 write data dcnt interrupt status flag (osf) t2 0000 5555 0001 h'5555 is written because dcnt write is given priority figure 11.72 contention between dcnt write and underflow
rev. 3.0, 09/04, page 421 of 1086 contention between dstr bit setting by cpu and clearing by underflow: if underflow occurs in the t2 state of a down-counter start register (dstr) ?1? write cycle by the cpu, clearing to 0 by the underflow has priority, and the corresponding bit of dstr is not set to 1. the timing in this case is shown in figure 11.73. p t1 dstr address str write cycle 1 written to dstr internal write signal underflow signal address down-count start register t2 dcnt 0000 0000 0001 figure 11.73 contention between dstr bit setting by cpu and clearing by underflow
rev. 3.0, 09/04, page 422 of 1086 timing of prescaler register (pscr), timer control register (tcr), and timer mode register (tmdr) setting: settings in the prescaler register (pscr), timer control register (tcr), and timer mode register (tmdr) should be made before the counter is started. operation is not guaranteed if these registers are modified while the counter is running. also, the counter must not be started until p? has been input 32 times after setting pscr1 to pscr4. interrupt status flag clearing procedure: when an interrupt status flag is cleared to 0 by the cpu, it must first be read before 0 is written to it. correct operation cannot be guaranteed if 0 is written without first reading the flag. setting h'0000 in free-running counters 6a to 6d, 7a to 7d (tcnt6a to tcnt6d, tcnt7a to tcnt7d): if h'0000 is written to a channel 6 and 7 free-running counter (tcnt6a to tcnt6d, tcnt7a to tcnt7d), and the counter is started, the interval up to the first compare-match with the cycle register (cylr) and duty register (dtr) will be a maximum of one tcnt input clock cycle longer than the set value. with subsequent compare-matches, the correct waveform will be output for the cylr and dtr values. register values when a free-running counter (tcnt) halts: if the timer start register (tstr) value is set to 0 during counter operation, only incrementing of the corresponding free- running counter (tcnt) is stopped, and neither the free-running counter (tcnt) nor any other atu registers are initialized. the external output value at the time tstr is cleared to 0 will continue to be output. tcnt0 writing and interval timer operation: if the cpu program writes 1 to a bit in free- running counter 0 (tcnt0) corresponding to a bit set to 1 in the interval interrupt request register (itvrr) when that tcnt0 bit is 0, tcnt0 bit 6, 7, 8, 9, 10, 11, 12, or 13 will be detected as having changed from 0 to 1, and an interrupt request will be sent to intc and a/d sampling will be started. while the count is halted with the str0 bit cleared to 0 in timer start register 1 (tstr1), the bit transition from 0 to 1 will still be detected. automatic tsr clearing by dmac activation by the atu: automatic clearing of tsr is performed after completion of the transfer when the dmac is in burst mode, and each time the dmac returns the bus in cycle steal mode. interrupt status flag setting/resetting: with tsr, a 0 write to a bit is possible even if overlapping events occur for the same bit before writing 0 after reading 1 to clear that bit. (the duplicate events are not accepted.)
rev. 3.0, 09/04, page 423 of 1086 external output value in software standby mode: in software standby mode, the atu register and external output values are cleared to 0. however, while the channel 1, 2, and 11 tio1a to tio1h, tio2a to tio2h, tio11a, and tio11b external output values are cleared to 0 immediately after software standby mode is exited, other external output values and all registers are cleared to 0 immediately after a transition to software standby mode. also, when pin output is inverted by the pin function controller's port b invert register (pbir) or port k invert register (pkir), the corresponding pins are set to 1. ck software standby mode other external outputs tio1a to 1h, tio2a to 2h, tio11a, 11b figure 11.74 external output value transition points in relation to software standby mode contention between tcnt clearing from channel 10 and tcnt overflow: when a channel 1 or 2 free-running counter (tcnt1a, tcnt1b, tcnt2a, tcnt2b) overflows, it is cleared to h'0000. if a clear signal from the channel 10 correction counter clear register (tcclr) is input at the same time, setting 1 to the overflow interrupt status flag (ovf) due to the overflow is still performed in the same way as for a normal overflow. contention between channel 10 reload register transfer timing and write: if there is contention between a multiplied-output transfer from the input capture register (icr10a) to the channel 10 reload register (rldr10c), and the timing of a cpu write to that register, the cpu write has priority and the multiplied output is ignored. contention between channel 10 reload timing and write to tcnt10c: if there is contention between a multiplied-output transfer from the input capture register (icr10a) to the channel 10 reload register (rldr10c), and a cpu write to the reload counter (tcnt10c), the cpu write has priority and the multiplied output is ignored.
rev. 3.0, 09/04, page 424 of 1086 atu pin setting: since input capture or count operation may be occurred when a port is set to the atu pin function, the following points must be noted. when using a port for input capture input, the corresponding tior register must be in the input capture disabled state when the port is set. regarding channel 10 ti10 input, tcr10 must be in the ti10 input disabled state when the port is set. when using a port for external clock input, the str bit for the corresponding channel must be in the count operation disabled state when the port is set. when using a port for event input, the corresponding tcr register must be in the count operation disabled state when the port is set. regarding tclkb and ti10 input, although input is assigned to a number of pins, when using tclkb and ti10 input, only one pin should be enabled. writing to rom area immediately after atu register write: if a write cycle for a rom address for which address bit 11 = 0 and address bit 12 = 1 (h'00001000 to h'000017ff, h'00003000 to h'000037ff, h'00005000 to h'000057ff, ..., h'0007f000 to h'0007f7ff, ..., h'000ff000 to h'000ff7ff) occurs immediately after an atu register write cycle, the value, or part of the value, written to rom will be written to the atu register. the following measures should be taken to prevent this. ? do not perform a cpu write to a rom address immediately after an atu register write cycle. for example, an instruction arrangement in which an mov instruction that writes to the atu is located at an even-word address (4n address), and is immediately followed by an mov instruction that writes to a rom area, will meet the bug conditions. ? do not perform an aud write to any of the above rom addresses immediately after an atu register write cycle. for example, in the case of a write to overlap ram when using the ram emulation function, the write should be performed to the on-chip ram area address, not the overlapping rom area address. ? do not perform a dmac write to an atu register when a rom address write operation occurs.
rev. 3.0, 09/04, page 425 of 1086 11.8 atu-ii registers and pins table 11.4 atu-ii registers and pins channel register name * 1 channel 0 channel 1 channel 2 channel 3 channel 4 channel 5 channel 6 channel 7 channel 8 channel 9 channel 10 channel 11 tstr (3) tstr1 tstr1 tstr1 tstr1 tstr1 tstr1 tstr2 tstr2 ? ? tstr1 tstr3 pscr (4) pscr1 pscr1 pscr1 pscr1 pscr1 pscr1 pscr2 pscr3 pscr1 ? pscr4 pscr1 tcnt (25) tcnt0h, tcnt0l tcnt1a, tcnt1b tcnt2a, tcnt2b tcnt3 tcnt4 tcnt5 tcnt6a to tcnt6d tcnt7a to tcnt7d ?? tcnt10ah, tcnt10al, tcnt10b to tcnt10h tcnt11 dcnt (16) ? ? ????? ? dcnt8a to dcnt8p ?? ? ecnt (6)? ? ????? ? ? ecnt9a to ecnt9f ?? tcr (17) ? tcr1a, tcr1b tcr2a, tcr2b tcr3 tcr4 tcr5 tcr6a, tcr6b tcr7a, tcr7b tcr8 tcr9a to tcr9c tcr10 tcr11 tior (17) tior0 tior1a to tior1d tior2a to tior2d tior3a, tior3b tior4a, tior4b tior5a, tior5b ? ? ? ? tior10 tior11 tsr (12) tsr0 tsr1a, tsr1b tsr2a, tsr2b tsr3 tsr3 tsr3 tsr6 tsr7 tsr8 tsr9 tsr10 tsr11 tier (12) tier0 tier1a, tier1b tier2a, tier2b tier3 tier3 tier3 tier6 tier7 tier8 tier9 tier10 tier11 itvrr (3) itvrr1, itvrr2a, itvrr2b ? ????? ? ? ? ? ? gr (37) ? gr1a to gr1h gr2a to gr2h gr3a to gr3d gr4a to gr4d gr5a to gr5d ???gr9a to gr9f gr10g gr11a, gr11b icr (5) icr0ah, icr0al to icr0dh, icr0dl ? ????? ? ? ? icr10ah, icr10al ? ocr (11) ? ocr1 ocr2a to ocr2h ???????ocr10ah, ocr10al, ocr10b ? osbr (2) ? osbr1 osbr2 ? ? ? ? ? ? ? ? ? trgmdr (1) ? trgmdr????? ? ? ? ? ? tmdr (1) ? ? ? tmdr tmdr tmdr ? ? ? ? ? ?
rev. 3.0, 09/04, page 426 of 1086 table 11.4 atu-ii registers and pins (cont) channel register name * 1 channel 0 channel 1 channel 2 channel 3 channel 4 channel 5 channel 6 channel 7 channel 8 channel 9 channel 10 channel 11 cylr (8)? ? ????cylr6a to cylr6d cylr7a to cylr7d ??? ? bfr (8)? ? ????bfr6a to bfr6d bfr7a to bfr7d ??? ? dtr (8)? ? ????dtr6a to dtr6d dtr7a to dtr7d ??? ? pmdr (1)? ? ????pmdr???? ? rldr (1)? ? ??????rldr?? ? tcnr (1) ? ? ??????tcnr?? ? otr (1)? ? ??????otr?? ? dstr (1)? ? ??????dstr?? ? rldenr (1) ? ? ??????rldenr?? ? rld (1)? ? ????????rld10c? ncr (1) ? ? ???????? ncr10 ? tcclr (1)? ? ????????tcclr10? pins * 2 ti0a to d tio1a to h, tclka, tclkb tio2a to h, tclka, tclkb tio3a to d, tclka, tclkb tio4a to d, tclka, tclkb tio5a to d, tclka, tclkb to6a to d to7a to d to8a to p ti9a to f t10 tio11a, tio11b, tclka, tclkb notes: 1. figures in parentheses show the number of registers. a 32-bit register is shown as a single register. 2. pin functions should be set as described in section 21, pin function controller (pfc).
rev. 3.0, 09/04, page 427 of 1086 section 12 advanced pulse controller (apc) 12.1 overview the sh7058 has an on-chip advanced pulse controller (apc) that can generate a maximum of eight pulse outputs, using the advanced timer unit ii (atu-ii) as the time base. 12.1.1 features the features of the apc are summarized below. ? maximum eight pulse outputs the pulse output pins can be selected from among eight pins. multiple settings are possible. ? output trigger provided by advanced timer unit ii (atu-ii) channel 11 pulse 0 output and 1 output is performed using the compare-match signal generated by the atu-ii channel 11 compare-match register as the trigger.
rev. 3.0, 09/04, page 428 of 1086 12.1.2 block diagram figure 12.1 shows a block diagram of the advanced pulse controller. internal/external clock compare compare- match signal atu-ii popcr (pulse output port setting register) apc tcnt11 gr11a gr11b reset set reset set reset set reset set reset set reset set reset set reset set puls0 puls1 puls2 puls3 puls5 puls4 puls6 puls7 popcr: pulse output port control register bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 compare- match signal figure 12.1 advanced pulse controller block diagram
rev. 3.0, 09/04, page 429 of 1086 12.1.3 pin configuration table 12.1 summarizes the advanced pulse controller?s output pins. table 12.1 advanced pulse controller pins pin name i/o function puls0 output apc pulse output 0 puls1 output apc pulse output 1 puls2 output apc pulse output 2 puls3 output apc pulse output 3 puls4 output apc pulse output 4 puls5 output apc pulse output 5 puls6 output apc pulse output 6 puls7 output apc pulse output 7 12.1.4 register configuration table 12.2 summarizes the advanced pulse controller?s register. table 12.2 advanced pulse controller register name abbreviation r/w initial value address access size pulse output port control register popcr r/w h'0000 h'fffff700 8, 16 note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles.
rev. 3.0, 09/04, page 430 of 1086 12.2 register descriptions 12.2.1 pulse output port control register (popcr) the pulse output port control register (popcr) is a 16-bit readable/writable register. popcr is initialized to h'0000 by a power-on reset and in hardware standby mode. it is not initialized in software standby mode. bit: 15 14 13 12 11 10 9 8 puls7 roe puls6 roe puls5 roe puls4 roe puls3 roe puls2 roe puls1 roe puls0 roe initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit: 7 6 5 4 3 2 1 0 puls7 soe puls6 soe puls5 soe puls4 soe puls3 soe puls2 soe puls1 soe puls0 soe initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w ? bits 15 to 8?puls7 to puls0 reset output enable (puls7roe to puls0roe): these bits enable or disable 0 output to the apc pulse output pins (puls7 to puls0) bit by bit. bits 15 to 8: puls7roe to puls0roe description 0 0 output to apc pulse output pin (puls7?puls0) is disabled (initial value) 1 0 output to apc pulse output pin (puls7?puls0) is enabled when one of these bits is set to 1, 0 is output from the corresponding pin on a compare-match between the gr11b and tcnt11 values. ? bits 7 to 0?puls7 to puls0 set output enable (puls7soe to puls0soe): these bits enable or disable 1 output to the apc pulse output pins (puls7 to puls0) bit by bit. bits 7 to 0: puls7soe to puls0soe description 0 1 output to apc pulse output pin (puls7?puls0) is disabled (initial value) 1 1 output to apc pulse output pin (puls7?puls0) is enabled
rev. 3.0, 09/04, page 431 of 1086 when one of these bits is set to 1, 1 is output from the corresponding pin on a compare-match between the gr11a and tcnt11 values. 12.3 operation 12.3.1 overview apc pulse output is enabled by designating multiplex pins for apc pulse output with the pin function controller (pfc), and setting the corresponding bits to 1 in the pulse output port control register (popcr). when general register 11a (gr11a) in the advanced timer unit ii (atu-ii) subsequently generates a compare-match signal, 1 is output from the pins set to 1 by bits 7 to 0 in popcr. when general register 11b (gr11b) generates a compare-match signal, 0 is output from the pins set to 1 by bits 15 to 8 in popcr. 0 is output from the output-enabled state until the first compare-match occurs. the advanced pulse controller output operation is shown in figure 12.2. cr port function selection upper 8 bits of popcr lower 8 bits of popcr reset signal set signal apc output pins (puls0 to puls7) compare-match signal compare-match signal gr11b gr11a figure 12.2 advanced pulse controller output operation
rev. 3.0, 09/04, page 432 of 1086 12.3.2 advanced pulse controller output operation example of setting procedure for advanced pulse controller output operation: figure 12.3 shows an example of the setting procedure for advanced pulse controller output operation. 1. set general registers gr11a and gr11b as output compare registers with the timer i/o control register (tior). 2. set the pulse rise point with gr11a and the pulse fall point with gr11b. 3. select the timer counter 11 (tcnt11) counter clock with the timer prescale register (pscr). tcnt11 can only be cleared by an overflow. 4. enable the respective interrupts with the timer interrupt enable register (tier). 5. set the pins for 1 output and 0 output with popcr. 6. set the control register for the port to be used by the apc to the apc output pin function. 7. set the str bit to 1 in the timer start register (tstr) to start timer counter 11 (tcnt11). 8. each time a compare-match interrupt is generated, update the gr value and set the next pulse output time. 9. each time a compare-match interrupt is generated, update the popcr value and set the next pin for pulse output.
rev. 3.0, 09/04, page 433 of 1086 gr function selection gr setting count operation setting interrupt request setting rise/fall port setting port output setting start count gr setting rise/fall port setting apc output operation compare-match? atu-ii settings port setting atu-ii setting atu-ii setting apc setting apc setting 1 2 3 4 5 6 7 8 9 no yes figure 12.3 example of setting procedure for advanced pulse controller output operation
rev. 3.0, 09/04, page 434 of 1086 example of advanced pulse controller output operation: figure 12.4 shows an example of advanced pulse controller output operation. 1. set atu-ii registers gr11a and gr11b (to be used for output trigger generation) as output compare registers. set the rise point in gr11a and the fall point in gr11b, and enable the respective compare-match interrupts. 2. write h'0101 to popcr. 3. start the tcnt11 count, when a gr11a compare-match occurs, 1 is output from the puls0 pin. when a gr11b compare-match occurs, 0 is output from the puls0 pin. 4. pulse output widths and output pins can be continually changed by successively rewriting gr11a, gr11b, and popcr in response to compare-match interrupts. 5. by setting popcr to a value such as h'e0e0, pulses can be output from up to eight pins in response to a single compare-match. gr11b gr11a h'0000 popcr puls0 puls1 puls2 puls3 puls4 puls5 puls6 puls7 tcnt value cleared on overflow e0e0 rewritten rewritten rewritten rewritten rewritten rewritten rewritten rewritten rewritten rewritten 0101 1010 0808 0404 0202 figure 12.4 example of advanced pulse controller output operation
rev. 3.0, 09/04, page 435 of 1086 12.4 usage notes contention between compare-match signals: if the same value is set for both gr11a and gr11b, and 0 output and 1 output are both enabled for the same pin by the popcr settings, 0 output has priority on pins puls0 to puls7 when compare-matches occur. h'8000 gr11a h'8000 h'ffff h'8000 gr11b h'0101 popcr puls0 pin tcnt value pin output is 0 figure 12.5 example of compare-match contention
rev. 3.0, 09/04, page 436 of 1086
rev. 3.0, 09/04, page 437 of 1086 section 13 watchdog timer (wdt) 13.1 overview the watchdog timer (wdt) is a 1-channel timer for monitoring system operations. if a system encounters a problem (crashes, for example) and the timer counter overflows without being rewritten correctly by the cpu, an overflow signal ( wdtovf ) is output externally. the wdt can simultaneously generate an internal reset signal for the entire chip. when the watchdog function is not needed, the wdt can be used as an interval timer. in the interval timer operation, an interval timer interrupt is generated at each counter overflow. 13.1.1 features the wdt has the following features: ? works in watchdog timer mode or interval timer mode ? outputs wdtovf in watchdog timer mode when the counter overflows in watchdog timer mode, overflow signal wdtovf is output externally. it is possible to select whether to reset the chip internally when this happens. either the power-on reset or manual reset signal can be selected as the internal reset signal. ? generates interrupts in interval timer mode when the counter overflows, it generates an interval timer interrupt. ? works with eight counter input clocks
rev. 3.0, 09/04, page 438 of 1086 13.1.2 block diagram figure 13.1 is the block diagram of the wdt. /2 /64 /128 /256 /512 /1024 /4096 /8192 internal clock sources clock overflow clock select interrupt control reset control rstcsr tcsr: tcnt: rstcsr: timer control/status register timer counter reset control/status register tcnt tcsr module bus bus interface internal data bus iti (interrupt signal) internal reset signal * wdt note: * the internal reset signal can be generated by making a register setting. figure 13.1 wdt block diagram 13.1.3 pin configuration table 13.1 shows the pin configuration. table 13.1 pin configuration pin abbreviation i/o function watchdog timer overflow wdtovf o outputs the counter overflow signal in watchdog timer mode
rev. 3.0, 09/04, page 439 of 1086 13.1.4 register configuration table 13.2 summarizes the three wdt registers. they are used to select the clock, switch the wdt mode, and control the reset signal. table 13.2 wdt registers address name abbreviation r/w initial value write * 1 read * 2 timer control/status register tcsr r/(w) * 3 h'18 h'ffffec10 timer counter tcnt r/w h'00 h'ffffec10 h'ffffec11 reset control/status register rstcsr r/(w) * 3 h'1f h'ffffec12 h'ffffec13 notes: in register access, four cycles are required for both byte access and word access. 1. write by word transfer. these registers cannot be written in bytes or longwords. 2. read by byte transfer. these registers cannot be read in words or longwords. 3. only 0 can be written to bit 7 to clear the flag. 13.2 register descriptions 13.2.1 timer counter (tcnt) tcnt is an 8-bit readable/writable upcounter. (tcnt differs from other registers in that it is more difficult to write to. see section 13.2.4, register access, for details.) when the timer enable bit (tme) in the timer control/status register (tcsr) is set to 1, the watchdog timer counter starts counting pulses of an internal clock selected by clock select bits 2 to 0 (cks2 to cks0) in tcsr. when the value of tcnt overflows (changes from h'ff to h'00), a watchdog timer overflow signal ( wdtovf ) or interval timer interrupt (iti) is generated, depending on the mode selected in the wt/ it bit in tcsr. tcnt is initialized to h'00 by a power-on reset, in hardware and software standby modes, and when the tme bit is cleared to 0. bit: 7 6 5 4 3 2 1 0 initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w
rev. 3.0, 09/04, page 440 of 1086 13.2.2 timer control/status register (tcsr) the timer control/status register (tcsr) is an 8-bit readable/writable register. (tcsr differs from other registers in that it is more difficult to write to. see section 13.2.4, register access, for details.) tcsr performs selection of the timer counter (tcnt) input clock and mode. tcsr is initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode. bit: 7 6 5 4 3 2 1 0 ovf wt/ it tme ? ? cks2 cks1 cks0 initial value: 0 0 0 1 1 0 0 0 r/w: r/(w) * r/w r/w r r r/w r/w r/w note: * the only operation permitted on the ovf bit is a write of 0 after reading 1. ? bit 7?overflow flag (ovf): indicates that tcnt has overflowed from h'ff to h'00 in interval timer mode. this flag is not set in the watchdog timer mode. bit 7: ovf description 0 no overflow of tcnt in interval timer mode (initial value) [clearing condition] when 0 is written to ovf after reading ovf 1 tcnt overflow in interval timer mode ? bit 6?timer mode select (wt/ it ): selects whether to use the wdt as a watchdog timer or interval timer. when tcnt overflows, the wdt either generates an interval timer interrupt (iti) or generates a wdtovf signal, depending on the mode selected. bit 6: wt/ it it it it description 0 interval timer mode: interval timer interrupt (iti) request to the cpu when tcnt overflows (initial value) 1 watchdog timer mode: wdtovf signal output externally when tcnt overflows. (section 13.2.3, reset control/status register (rstcsr), describes in detail what happens when tcnt overflows in watchdog timer mode.)
rev. 3.0, 09/04, page 441 of 1086 ? bit 5?timer enable (tme): enables or disables the timer. bit 5: tme description 0 timer disabled: tcnt is initialized to h'00 and count-up stops (initial value) 1 timer enabled: tcnt starts counting. a wdtovf signal or interrupt is generated when tcnt overflows. ? bits 4 and 3?reserved: these bits are always read as 1. the write value should always be 1. ? bits 2 to 0?clock select 2 to 0 (cks2 to cks0): these bits select one of eight internal clock sources for input to tcnt. the clock signals are obtained by dividing the frequency of the system clock ( ). description bit 2: cks2 bit 1: cks1 bit 0: cks0 clock source overflow interval * ( = 40 mhz) 0 0 0 /2 (initial value) 12.8 s 0 0 1 /64 409.6 s 0 1 0 /128 0.8 ms 0 1 1 /256 1.6 ms 1 0 0 /512 3.3 ms 1 0 1 /1024 6.6 ms 1 1 0 /4096 26.2 ms 1 1 1 /8192 52.4 ms note: * the overflow interval listed is the time from when the tcnt begins counting at h'00 until an overflow occurs. refer to section 13.4.7, multiplication factor for internal clock signal ( ) and overflow time.
rev. 3.0, 09/04, page 442 of 1086 13.2.3 reset control/status register (rstcsr) rstcsr is an 8-bit readable/writable register. (rstcsr differs from other registers in that it is more difficult to write. see section 13.2.4, register access, for details.) it controls output of the internal reset signal generated by timer counter (tcnt) overflow. rstcr is initialized to h'1f by input of a reset signal from the res pin, but is not initialized by the internal reset signal generated by overflow of the wdt. it is initialized to h'1f in hardware standby mode and software standby mode. bit: 7 6 5 4 3 2 1 0 wovf rste rsts ? ? ? ? ? initial value: 0 0 0 1 1 1 1 1 r/w: r/(w) * r/w r/w r r r r r note: * only 0 can be written to bit 7 to clear the flag. ? bit 7?watchdog timer overflow flag (wovf): indicates that tcnt has overflowed (h'ff to h'00) in watchdog timer mode. this flag is not set in interval timer mode. bit 7: wovf description 0 no tcnt overflow in watchdog timer mode (initial value) [clearing condition] when 0 is written to wovf after reading wovf 1 set by tcnt overflow in watchdog timer mode ? bit 6?reset enable (rste): selects whether to reset the chip internally if tcnt overflows in watchdog timer mode. bit 6: rste description 0 not reset when tcnt overflows (initial value) lsi not reset internally, but tcnt and tcsr reset within wdt. 1 reset when tcnt overflows ? bit 5?reset select (rsts): selects the kind of internal reset to be generated when tcnt overflows in watchdog timer mode. bit 5: rsts description 0 power-on reset (initial value) 1 manual reset ? bits 4 to 0?reserved: these bits are always read as 1. the write value should always be 1.
rev. 3.0, 09/04, page 443 of 1086 13.2.4 register access the watchdog timer?s tcnt, tcsr, and rstcsr registers differ from other registers in that they are more difficult to write to. the procedures for writing and reading these registers are given below. writing to tcnt and tcsr: these registers must be written by a word transfer instruction. they cannot be written by byte transfer instructions. tcnt and tcsr both have the same write address. the write data must be contained in the lower byte of the written word. the upper byte must be h'5a (for tcnt) or h'a5 (for tcsr) (figure 13.2). this transfers the write data from the lower byte to tcnt or tcsr. h'5a h'ffffec10 address: writing to tcnt 15 8 7 0 write data h'a5 h'ffffec10 address: writing to tcsr 15 8 7 0 write data figure 13.2 writing to tcnt and tcsr writing to rstcsr: rstcsr must be written by a word access to address h'ffffec12. it cannot be written by byte transfer instructions. procedures for writing 0 to wovf (bit 7) and for writing to rste (bit 6) and rsts (bit 5) are different, as shown in figure 13.3. to write 0 to the wovf bit, the write data must be h'a5 in the upper byte and h'00 in the lower byte. this clears the wovf bit to 0. the rste and rsts bits are not affected. to write to the rste and rsts bits, the upper byte must be h'5a and the lower byte must be the write data. the values of bits 6 and 5 of the lower byte are transferred to the rste and rsts bits, respectively. the wovf bit is not affected.
rev. 3.0, 09/04, page 444 of 1086 h'a5 h'ffffec12 address: writing 0 to the wovf bit 15 8 7 0 h'00 h'5a h'ffffec12 address: writing to the rste and rsts bits 15 8 7 0 write data figure 13.3 writing to rstcsr reading from tcnt, tcsr, and rstcsr: tcnt, tcsr, and rstcsr are read like other registers. use byte transfer instructions. the read addresses are h'ffffec10 for tcsr, h'ffffec11 for tcnt, and h'ffffec13 for rstcsr. 13.3 operation 13.3.1 watchdog timer mode to use the wdt as a watchdog timer, set the wt/ it and tme bits in tcsr to 1. software must prevent tcnt overflow by rewriting the tcnt value (normally by writing h'00) before overflow occurs. no tcnt overflows will occur while the system is operating normally, but if tcnt fails to be rewritten and overflows occur due to a system crash or the like, a wdtovf signal is output externally (figure 13.4). the wdtovf signal can be used to reset the system. the wdtovf signal is output for 128 clock cycles. if the rste bit in rstcsr is set to 1, a signal to reset the chip will be generated internally simultaneous with the wdtovf signal when tcnt overflows. either a power-on reset or a manual reset can be selected by the rsts bit in rstcsr. the internal reset signal is output for 512 clock cycles. when a wdt overflow reset is generated simultaneously with a reset input at the res pin, the res reset takes priority, and the wovf bit in rstcsr is cleared to 0. the following registers are not initialized by a wdt reset signal: ? pfc (pin function controller) registers ? i/o port registers these registers are initialized only by an external power-on reset.
rev. 3.0, 09/04, page 445 of 1086 h'ff h'00 overflow wt/ = 1 tme = 1 h'00 written in tcnt internal reset signal * signal tcnt value and internal reset generated wovf = 1 wt/ = 1 tme = 1 wt/ : tme: timer mode select bit timer enable bit h'00 written in tcnt time 512 clock cycles 128 clock cycles note: * internal reset signal occurs only when the rste bit is set to 1. figure 13.4 operation in watchdog timer mode
rev. 3.0, 09/04, page 446 of 1086 13.3.2 interval timer mode to use the wdt as an interval timer, clear wt/ it to 0 and set tme to 1 in tcsr. an interval timer interrupt (iti) is generated each time the timer counter overflows. this function can be used to generate interval timer interrupts at regular intervals (figure 13.5). h'ff tcnt value iti: interval timer interrupt request generation h'00 wt/it = 0 tme = 1 iti iti iti iti time overflow overflow overflow overflow figure 13.5 operation in interval timer mode 13.3.3 timing of setting the overflow flag (ovf) in interval timer mode, when tcnt overflows, the ovf flag in tcsr is set to 1 and an interval timer interrupt (iti) is simultaneously requested (figure 13.6). h'ff h'00 ck tcnt overflow signal (internal signal) ovf figure 13.6 timing of setting ovf
rev. 3.0, 09/04, page 447 of 1086 13.3.4 timing of setting the watchdog timer overflow flag (wovf) when tcnt overflows in watchdog timer mode, the wovf bit in rstcsr is set to 1 and a wdtovf signal is output. when the rste bit in rstcsr is set to 1, tcnt overflow enables an internal reset signal to be generated for the entire chip (figure 13.7). h'ff h'00 ck tcnt overflow signal (internal signal) wovf figure 13.7 timing of setting wovf 13.4 usage notes 13.4.1 tcnt write and increment contention if a timer counter increment clock pulse is generated during the t3 state of a write cycle to tcnt, the write takes priority and the timer counter is not incremented (figure 13.8).
rev. 3.0, 09/04, page 448 of 1086 ck address internal write signal tcnt input clock tcnt nm tcnt address counter write data t1 t2 t3 tcnt write cycle figure 13.8 contention between tcnt write and increment 13.4.2 changing cks2 to cks0 bit values if the values of bits cks2 to cks0 in the timer control/status register (tcsr) are rewritten while the wdt is running, the count may not increment correctly. always stop the watchdog timer (by clearing the tme bit to 0) before changing the values of bits cks2 to cks0. 13.4.3 changing between watchdog timer/interval timer modes to prevent incorrect operation, always stop the watchdog timer (by clearing the tme bit to 0) before switching between interval timer mode and watchdog timer mode. 13.4.4 system reset by wdtovf wdtovf wdtovf wdtovf signal if a wdtovf signal is input to the res pin, the chip cannot be initialized correctly. avoid logical input of the wdtovf output signal to the res input pin. to reset the entire system with the wdtovf signal, use the circuit shown in figure 13.9.
rev. 3.0, 09/04, page 449 of 1086 reset input reset signal to entire system this lsi res wdtovf figure 13.9 example of system reset circuit using wdtovf wdtovf wdtovf wdtovf signal 13.4.5 internal reset in watchdog timer mode if the rste bit is cleared to 0 in watchdog timer mode, the chip will not be reset internally when a tcnt overflow occurs, but tcnt and tcsr in the wdt will be reset. because the internal clock obtained by dividing the system clock( ) is also reset at this time, the sci, a/d converter, and cmt that use the internal clock may not operate correctly from hereafter. to continue using these modules, initialize them before use. 13.4.6 manual reset in watchdog timer when an internal reset is effected by tcnt overflow in watchdog timer mode, the processor waits until the end of the bus cycle at the time of manual reset generation before making the transition to manual reset exception processing. therefore, the bus cycle is retained in a manual reset, but if a manual reset occurs while the bus is released or during dmac burst transfer, manual reset exception processing will be deferred until the cpu acquires the bus. however, if the interval from generation of the manual reset until the cpu acquires the bus cycle is equal to or longer than the internal manual reset interval of 512 cycles, the internal manual reset source is ignored instead of being deferred, and manual reset exception processing is not executed. 13.4.7 multiplication factor for internal clock signal ( ) and overflow time the watchdog timer operates synchronously with the internal clock signal ( ) (at four or eight times the frequency of the input clock signal). therefore, even if the same clock signal is selected using the clock select bits (cks2 to cks0) in the timer control/status register (tcsr), the overflow timing differs depending on whether the multiplication factor for the internal clock signal ( ) is four or eight.
rev. 3.0, 09/04, page 450 of 1086
rev. 3.0, 09/04, page 451 of 1086 section 14 compare match timer (cmt) 14.1 overview the sh7058 has an on-chip compare match timer (cmt) comprising two 16-bit timer channels. the cmt has 16-bit counters and can generate interrupts at set intervals. 14.1.1 features the cmt has the following features: ? four types of counter input clock can be selected ? one of four internal clocks (p /8, p /32, p /128, p /512) can be selected independently for each channel. ? interrupt sources ? a compare match interrupt can be requested independently for each channel.
rev. 3.0, 09/04, page 452 of 1086 14.1.2 block diagram figure 14.1 shows a block diagram of the cmt. cm10 control circuit internal bus clock selection control circuit clock selection cmi1 p /8 p /32 p /128 p /512 p /8 p /32 p /128 p /512 cmcsr1 cmcor1 cmcnt1 cmcnt0 cmcor0 comparator cmstr cmcsr0 comparator bus interface module bus cmt cmstr: cmcsr: cmcor: cmcnt: cmi: compare match timer start register compare match timer control/status register compare match timer constant register compare match timer counter compare match interrupt figure 14.1 cmt block diagram
rev. 3.0, 09/04, page 453 of 1086 14.1.3 register configuration table 14.1 summarizes the cmt register configuration. table 14.1 register configuration channel name abbreviation r/w initial value address access size (bits) shared compare match timer start register cmstr r/w h'0000 h'fffff710 8, 16, 32 compare match timer control/status register 0 cmcsr0 r/(w) * h'0000 h'fffff712 8, 16, 32 compare match timer counter 0 cmcnt0 r/w h'0000 h'fffff714 8, 16, 32 0 compare match timer constant register 0 cmcor0 r/w h'ffff h'fffff716 8, 16, 32 compare match timer control/status register 1 cmcsr1 r/(w) * h'0000 h'fffff718 8, 16, 32 compare match timer counter 1 cmcnt1 r/w h'0000 h'fffff71a 8, 16, 32 1 compare match timer constant register 1 cmcor1 r/w h'ffff h'fffff71c 8, 16, 32 notes: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles for byte access and word access, and eight or nine internal clock ( ) cycles for longword access. * only 0 can be written to the cmcsr0 and cmcsr1 cmf bits to clear the flags.
rev. 3.0, 09/04, page 454 of 1086 14.2 register descriptions 14.2.1 compare match timer start register (cmstr) the compare match timer start register (cmstr) is a 16-bit register that selects whether to operate or halt the channel 0 and channel 1 counters (cmcnt). it is initialized to h'0000 by a power-on reset and in the standby modes. bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ? initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r bit: 7 6 5 4 3 2 1 0 ? ? ? ? ? ? str1 str0 initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r/w r/w ? bits 15?2?reserved: these bits are always read as 0. the write value should always be 0. ? bit 1?count start 1 (str1): selects whether to operate or halt compare match timer counter 1. bit 1: str1 description 0 cmcnt1 count operation halted (initial value) 1 cmcnt1 count operation ? bit 0?count start 0 (str0): selects whether to operate or halt compare match timer counter 0. bit 0: str0 description 0 cmcnt0 count operation halted (initial value) 1 cmcnt0 count operation
rev. 3.0, 09/04, page 455 of 1086 14.2.2 compare match timer control/status register (cmcsr) the compare match timer control/status register (cmcsr) is a 16-bit register that indicates the occurrence of compare matches, sets the enable/disable status of interrupts, and establishes the clock used for incrementation. it is initialized to h'0000 by a power-on reset and in the standby modes. bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ? initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r bit: 7 6 5 4 3 2 1 0 cmf cmie ? ? ? ? cks1 cks0 initial value: 0 0 0 0 0 0 0 0 r/w: r/(w) * r/w r r r r r/w r/w note: * only 0 can be written to clear the flag. ? bits 15?8 and 5?2?reserved: these bits are always read as 0. the write value should always be 0. ? bit 7?compare match flag (cmf): this flag indicates whether or not the cmcnt and cmcor values have matched. bit 7: cmf description 0 cmcnt and cmcor values have not matched (initial value) [clearing condition] write 0 to cmf after reading 1 from it 1 cmcnt and cmcor values have matched ? bit 6?compare match interrupt enable (cmie): selects whether to enable or disable a compare match interrupt (cmi) when the cmcnt and cmcor values have matched (cmf = 1). bit 6: cmie description 0 compare match interrupt (cmi) disabled (initial value) 1 compare match interrupt (cmi) enabled
rev. 3.0, 09/04, page 456 of 1086 ? bits 1 and 0?clock select 1 and 0 (cks1, cks0): these bits select the clock input to cmcnt from among the four internal clocks obtained by dividing the peripheral clock (p ). when the str bit of cmstr is set to 1, cmcnt begins incrementing with the clock selected by cks1 and cks0. bit 1: cks1 bit 0: cks0 description 0p /8 (initial value) 0 1p /32 0p /128 1 1p /512 14.2.3 compare match timer counter (cmcnt) the compare match timer counter (cmcnt) is a 16-bit register used as an up-counter for generating interrupt requests. when an internal clock is selected with the cks1 and cks0 bits of the cmcsr register and the str bit of cmstr is set to 1, cmcnt begins incrementing with that clock. when the cmcnt value matches that of the compare match timer constant register (cmcor), cmcnt is cleared to h'0000 and the cmf flag of cmcsr is set to 1. if the cmie bit of cmcsr is set to 1 at this time, a compare match interrupt (cmi) is requested. cmcnt is initialized to h'0000 by a power-on reset and in the standby modes. it is not initialized by a manual reset. bit: 15 14 13 12 11 10 9 8 initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit:76543210 initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w
rev. 3.0, 09/04, page 457 of 1086 14.2.4 compare match timer constant register (cmcor) the compare match timer constant register (cmcor) is a 16-bit register that sets the period for compare match with cmcnt. cmcor is initialized to h'ffff by a power-on reset and in the standby modes. it is not initialized by a manual reset. bit: 15 14 13 12 11 10 9 8 initial value:11111111 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit:76543210 initial value:11111111 r/w: r/w r/w r/w r/w r/w r/w r/w r/w 14.3 operation 14.3.1 cyclic count operation when an internal clock is selected with the cks1, cks0 bits of the cmcsr register and the str bit of cmstr is set to 1, cmcnt begins incrementing with the selected clock. when the cmcnt counter value matches that of the compare match constant register (cmcor), the cmcnt counter is cleared to h'0000 and the cmf flag of the cmcsr register is set to 1. if the cmie bit of the cmcsr register is set to 1 at this time, a compare match interrupt (cmi) is requested. the cmcnt counter begins counting up again from h'0000. figure 14.2 shows the compare match counter operation. cmcor h'0000 cmcnt value time counter cleared by cmcor compare match figure 14.2 counter operation
rev. 3.0, 09/04, page 458 of 1086 14.3.2 cmcnt count timing one of four clocks (p /8, p /32, p /128, p /512) obtained by dividing the peripheral clock (p ) can be selected by the cks1 and cks0 bits of cmcsr. figure 14.3 shows the timing. p n ? 1 n n + 1 internal clock cmcnt input clock cmcnt figure 14.3 count timing 14.4 interrupts 14.4.1 interrupt sources and dtc activation the cmt has a compare match interrupt for each channel, with independent vector addresses allocated to each of them. the corresponding interrupt request is output when interrupt request flag cmf is set to 1 and interrupt enable bit cmie has also been set to 1. when activating cpu interrupts by interrupt request, the priority between the channels can be changed by means of interrupt controller settings. see section 7, interrupt controller (intc), for details. 14.4.2 compare match flag set timing the cmf bit of the cmcsr register is set to 1 by the compare match signal generated when the cmcor register and the cmcnt counter match. the compare match signal is generated upon the final state of the match (timing at which the cmcnt counter matching count value is updated). consequently, after the cmcor register and the cmcnt counter match, a compare match signal will not be generated until a cmcnt counter input clock occurs. figure 14.4 shows the cmf bit set timing.
rev. 3.0, 09/04, page 459 of 1086 p figure 14.4 cmf set timing 14.4.3 compare match flag clear timing the cmf bit of the cmcsr register is cleared by writing a 0 to it after reading a 1. figure 14.5 shows the timing when the cmf bit is cleared by the cpu. t2 t1 p figure 14.5 timing of cmf clear by the cpu
rev. 3.0, 09/04, page 460 of 1086 14.5 usage notes take care that the contentions described in sections 14.5.1 to 14.5.3 do not arise during cmt operation. 14.5.1 contention between cmcnt write and compare match if a compare match signal is generated during the t2 state of the cmcnt counter write cycle, the cmcnt counter clear has priority, so the write to the cmcnt counter is not performed. figure 14.6 shows the timing. t1 t2 p figure 14.6 cmcnt write and compare match contention
rev. 3.0, 09/04, page 461 of 1086 14.5.2 contention between cmcnt word write and incrementation if an increment occurs during the t2 state of the cmcnt counter word write cycle, the counter write has priority, so no increment occurs. figure 14.7 shows the timing. cmcnt write data t1 t2 p figure 14.7 cmcnt word write and increment contention
rev. 3.0, 09/04, page 462 of 1086 14.5.3 contention between cmcnt byte write and incrementation if an increment occurs during the t2 state of the cmcnt byte write cycle, the counter write has priority, so no increment of the write data results on the side on which the write was performed. the byte data on the side on which writing was not performed is also not incremented, so the contents are those before the write. figure 14.8 shows the timing when an increment occurs during the t2 state of the cmcnth write cycle. t1 t2 p figure 14.8 cmcnt byte write and increment contention
rev. 3.0, 09/04, page 463 of 1086 section 15 serial communication interface (sci) 15.1 overview the sh7058 has a serial communication interface (sci) with five independent channels. the sci supports both asynchronous and synchronous serial communication. it also has a multiprocessor communication function for serial communication between two or more processors, and a clock inverted input/output function. 15.1.1 features the sci has the following features: ? selection of asynchronous or synchronous as the serial communication mode ? asynchronous mode serial data communication is synchronized in character units. the sci can communicate with a universal asynchronous receiver/transmitter (uart), an asynchronous communication interface adapter (acia), or any other chip that employs standard asynchronous serial communication. it can also communicate with two or more other processors using the multiprocessor communication function. there are twelve selectable serial data communication formats. ? data length: seven or eight bits ? stop bit length: one or two bits ? parity: even, odd, or none ? multiprocessor bit: one or none ? receive error detection: parity, overrun, and framing errors ? break detection: by reading the rxd level directly when a framing error occurs ? synchronous mode serial data communication is synchronized with a clock signal. the sci can communicate with other chips having a synchronous communication function. there is one serial data communication format. ? data length: eight bits ? receive error detection: overrun errors ? serial clock inverted input/output ? full duplex communication: the transmitting and receiving sections are independent, so the sci can transmit and receive simultaneously. both sections use double buffering, so continuous data transfer is possible in both the transmit and receive directions. ? on-chip baud rate generator with selectable bit rates
rev. 3.0, 09/04, page 464 of 1086 ? internal or external transmit/receive clock source: baud rate generator (internal) or sck pin (external) ? four types of interrupts: transmit-data-empty, transmit-end, receive-data-full, and receive- error interrupts are requested independently. the transmit-data-empty and receive-data-full interrupts can start the direct memory access controller (dmac) to transfer data. ? selection of lsb-first or msb-first transfer (8-bit length) this selection is available regardless of the communication mode. (the descriptions in this section are based on lsb-first transfer.) 15.1.2 block diagram figure 15.1 shows a block diagram of the sci. parity generation parity check transmit/ receive control baud rate generator clock external clock bus interface internal data bus rxd rdr tdr rsr tsr ssr scr smr sdcr brr p p /4 p /16 p /64 tei txi rxi eri sck rsr: rdr: tsr: tdr: receive shift register receive data register transmit shift register transmit data register smr: scr: ssr: brr: sdcr: serial mode register serial control register serial status register bit rate register serial direction control register txd sci module data bus figure 15.1 sci block diagram
rev. 3.0, 09/04, page 465 of 1086 15.1.3 pin configuration table 15.1 summarizes the sci pins by channel. table 15.1 sci pins channel pin name abbreviation input/output function serial clock pin sck0 input/output sci0 clock input/output receive data pin rxd0 input sci0 receive data input 0 transmit data pin txd0 output sci0 transmit data output serial clock pin sck1 input/output sci1 clock input/output receive data pin rxd1 input sci1 receive data input 1 transmit data pin txd1 output sci1 transmit data output serial clock pin sck2 input/output sci2 clock input/output receive data pin rxd2 input sci2 receive data input 2 transmit data pin txd2 output sci2 transmit data output serial clock pin sck3 input/output sci3 clock input/output receive data pin rxd3 input sci3 receive data input 3 transmit data pin txd3 output sci3 transmit data output serial clock pin sck4 input/output sci4 clock input/output receive data pin rxd4 input sci4 receive data input 4 transmit data pin txd4 output sci4 transmit data output note: in the text the pins are referred to as sck, rxd, and txd, omitting the channel number.
rev. 3.0, 09/04, page 466 of 1086 15.1.4 register configuration table 15.2 summarizes the sci internal registers. these registers select the communication mode (asynchronous or synchronous), specify the data format and bit rate, and control the transmitter and receiver sections. table 15.2 registers channel name abbreviation r/w initial value address * 2 access size serial mode register 0 smr0 r/w h'00 h'fffff000 bit rate register 0 brr0 r/w h'ff h'fffff001 serial control register 0 scr0 r/w h'00 h'fffff002 transmit data register 0 tdr0 r/w h'ff h'fffff003 serial status register 0 ssr0 r/(w) * 1 h'84 h'fffff004 receive data register 0 rdr0 r h'00 h'fffff005 8, 16 0 serial direction control register 0 sdcr0 r/w h'f2 h'fffff006 8 serial mode register 1 smr1 r/w h'00 h'fffff008 bit rate register 1 brr1 r/w h'ff h'fffff009 serial control register 1 scr1 r/w h'00 h'fffff00a transmit data register 1 tdr1 r/w h'ff h'fffff00b serial status register 1 ssr1 r/(w) * 1 h'84 h'fffff00c receive data register 1 rdr1 r h'00 h'fffff00d 8, 16 1 serial direction control register 1 sdcr1 r/w h'f2 h'fffff00e 8 serial mode register 2 smr2 r/w h'00 h'fffff010 bit rate register 2 brr2 r/w h'ff h'fffff011 serial control register 2 scr2 r/w h'00 h'fffff012 transmit data register 2 tdr2 r/w h'ff h'fffff013 serial status register 2 ssr2 r/(w) * 1 h'84 h'fffff014 receive data register 2 rdr2 r h'00 h'fffff015 8, 16 2 serial direction control register 2 sdcr2 r/w h'f2 h'fffff016 8
rev. 3.0, 09/04, page 467 of 1086 table 15.2 registers (cont) channel name abbreviation r/w initial value address * 2 access size serial mode register 3 smr3 r/w h'00 h'fffff018 bit rate register 3 brr3 r/w h'ff h'fffff019 serial control register 3 scr3 r/w h'00 h'fffff01a transmit data register 3 tdr3 r/w h'ff h'fffff01b serial status register 3 ssr3 r/(w) * 1 h'84 h'fffff01c receive data register 3 rdr3 r h'00 h'fffff01d 8, 16 3 serial direction control register 3 sdcr3 r/w h'f2 h'fffff01e 8 serial mode register 4 smr4 r/w h'00 h'fffff020 bit rate register 4 brr4 r/w h'ff h'fffff021 serial control register 4 scr4 r/w h'00 h'fffff022 transmit data register 4 tdr4 r/w h'ff h'fffff023 serial status register 4 ssr4 r/(w) * 1 h'84 h'fffff024 receive data register 4 rdr4 r h'00 h'fffff025 8, 16 4 serial direction control register 4 sdcr4 r/w h'f2 h'fffff026 8 notes: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles for byte access and word access, and eight or nine internal clock ( ) cycles for longword access. 1. only 0 can be written to clear the flags. 2. do not access empty addresses.
rev. 3.0, 09/04, page 468 of 1086 15.2 register descriptions 15.2.1 receive shift register (rsr) bit: 7 6 5 4 3 2 1 0 r/w: ? ? ? ? ? ? ? ? the receive shift register (rsr) receives serial data. data input at the rxd pin is loaded into rsr in the order received, lsb (bit 0) first, converting the data to parallel form. when one byte has been received, it is automatically transferred to rdr. the cpu cannot read or write to rsr directly. 15.2.2 receive data register (rdr) bit: 7 6 5 4 3 2 1 0 initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r the receive data register (rdr) stores serial receive data. the sci completes the reception of one byte of serial data by moving the received data from the receive shift register (rsr) into rdr for storage. rsr is then ready to receive the next data. this double buffering allows the sci to receive data continuously. the cpu can read but not write to rdr. rdr is initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode. it is not initialized by a manual reset. 15.2.3 transmit shift register (tsr) bit: 7 6 5 4 3 2 1 0 r/w: ? ? ? ? ? ? ? ? the transmit shift register (tsr) transmits serial data. the sci loads transmit data from the transmit data register (tdr) into tsr, then transmits the data serially from the txd pin, lsb (bit 0) first. after transmitting one data byte, the sci automatically loads the next transmit data from tdr into tsr and starts transmitting again. if the tdre bit of ssr is 1, however, the sci does not load the tdr contents into tsr.
rev. 3.0, 09/04, page 469 of 1086 the cpu cannot read or write to tsr directly. 15.2.4 transmit data register (tdr) bit: 7 6 5 4 3 2 1 0 initial value: 1 1 1 1 1 1 1 1 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the transmit data register (tdr) is an 8-bit register that stores data for serial transmission. when the sci detects that the transmit shift register (tsr) is empty, it moves transmit data written in tdr into tsr and starts serial transmission. continuous serial transmission is possible by writing the next transmit data in tdr during serial transmission from tsr. the cpu can always read and write to tdr. tdr is initialized to h'ff by a power-on reset, and in hardware standby mode and software standby mode. it is not initialized by a manual reset. 15.2.5 serial mode register (smr) bit: 7 6 5 4 3 2 1 0 c/ a chr pe o/ e stop mp cks1 cks0 initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the serial mode register (smr) is an 8-bit register that specifies the sci serial communication format and selects the clock source for the baud rate generator. the cpu can always read and write to smr. smr is initialized to h'00 by a power-on reset and in hardware standby mode. it is not initialized by a manual reset and in software standby mode. ? bit 7?communication mode (c/ a ): selects whether the sci operates in asynchronous or synchronous mode. bit 7: c/ a a a a description 0 asynchronous mode (initial value) 1 synchronous mode
rev. 3.0, 09/04, page 470 of 1086 ? bit 6?character length (chr): selects 7-bit or 8-bit data in asynchronous mode. in synchronous mode, the data length is always eight bits, regardless of the chr setting. bit 6: chr description 0 eight-bit data (initial value) 1 seven-bit data when 7-bit data is selected, the msb (bit 7) of the transmit data register is not transmitted. lsb-first/msb-first selection is not available. ? bit 5?parity enable (pe): selects whether to add a parity bit to transmit data and to check the parity of receive data, in asynchronous mode. in synchronous mode and when using a multiprocessor format, a parity bit is neither added nor checked, regardless of the pe bit setting. bit 5: pe description 0 parity bit not added or checked (initial value) 1 parity bit added and checked when pe is set to 1, an even or odd parity bit is added to transmit data, depending on the parity mode (o/ e bit) setting. receive data parity is checked according to the even/odd (o/ e bit) setting. ? bit 4?parity mode (o/ e ): selects even or odd parity when parity bits are added and checked. the o/ e setting is used only in asynchronous mode and only when the parity enable bit (pe) is set to 1 to enable parity addition and checking. the o/ e setting is invalid in synchronous mode, in asynchronous mode when parity bit addition and checking is disabled, and when using a multiprocessor format. bit 4: o/ e e e e description 0 even parity (initial value) if even parity is selected, the parity bit is added to transmit data to make an even number of 1s in the transmitted character and parity bit combined. receive data is checked to see if it has an even number of 1s in the received character and parity bit combined. 1 odd parity if odd parity is selected, the parity bit is added to transmit data to make an odd number of 1s in the transmitted character and parity bit combined. receive data is checked to see if it has an odd number of 1s in the received character and parity bit combined.
rev. 3.0, 09/04, page 471 of 1086 ? bit 3?stop bit length (stop): selects one or two bits as the stop bit length in asynchronous mode. this setting is used only in asynchronous mode. it is ignored in synchronous mode because no stop bits are added. in receiving, only the first stop bit is checked, regardless of the stop bit setting. if the second stop bit is 1, it is treated as a stop bit, but if the second stop bit is 0, it is treated as the start bit of the next incoming character. bit 3: stop description 0 one stop bit (initial value) in transmitting, a single bit of 1 is added at the end of each transmitted character. 1 two stop bits in transmitting, two 1-bits are added at the end of each transmitted character. ? bit 2?multiprocessor mode (mp): selects multiprocessor format. when multiprocessor format is selected, settings of the parity enable (pe) and parity mode (o/ e ) bits are ignored. the mp bit setting is used only in asynchronous mode; it is ignored in synchronous mode. for the multiprocessor communication function, see section 15.3.3, multiprocessor communication. bit 2: mp description 0 multiprocessor function disabled (initial value) 1 multiprocessor format selected ? bits 1 and 0?clock select 1 and 0 (cks1, cks0): these bits select the internal clock source of the on-chip baud rate generator. four clock sources are available: p , p /4, p /16, or p /64 (p is the peripheral clock). for further information on the clock source, bit rate register settings, and baud rate, see section 15.2.8, bit rate register (brr). bit 1: cks1 bit 0: cks0 description 0 p (initial value) 0 1 p /4 0 p /16 1 1 p /64
rev. 3.0, 09/04, page 472 of 1086 15.2.6 serial control register (scr) bit: 7 6 5 4 3 2 1 0 tie rie te re mpie teie cke1 cke0 initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the serial control register (scr) operates the sci transmitter/receiver, selects the serial clock output in asynchronous mode, enables/disables interrupt requests, and selects the transmit/receive clock source. the cpu can always read and write to scr. scr is initialized to h'00 by a power- on reset and in hardware standby mode. it is not initialized by a manual reset and in software standby mode. ? bit 7?transmit interrupt enable (tie): enables or disables the transmit-data-empty interrupt (txi) requested when the transmit data register empty bit (tdre) in the serial status register (ssr) is set to 1 by transfer of serial transmit data from tdr to tsr. bit 7: tie description 0 transmit-data-empty interrupt request (txi) is disabled (initial value) the txi interrupt request can be cleared by reading tdre after it has been set to 1, then clearing tdre to 0, or by clearing tie to 0. 1 transmit-data-empty interrupt request (txi) is enabled ? bit 6?receive interrupt enable (rie): enables or disables the receive-data-full interrupt (rxi) requested when the receive data register full bit (rdrf) in the serial status register (ssr) is set to 1 by transfer of serial receive data from rsr to rdr. it also enables or disables receive-error interrupt (eri) requests. bit 6: rie description 0 receive-data-full interrupt (rxi) and receive-error interrupt (eri) requests are disabled (initial value) rxi and eri interrupt requests can be cleared by reading the rdrf flag or error flag (fer, per, or orer) after it has been set to 1, then clearing the flag to 0, or by clearing rie to 0. 1 receive-data-full interrupt (rxi) and receive-error interrupt (eri) requests are enabled
rev. 3.0, 09/04, page 473 of 1086 ? bit 5?transmit enable (te): enables or disables the sci serial transmitter. bit 5: te description 0 transmitter disabled (initial value) the transmit data register empty bit (tdre) in the serial status register (ssr) is locked at 1. 1 transmitter enabled serial transmission starts when the transmit data register empty (tdre) bit in the serial status register (ssr) is cleared to 0 after writing of transmit data into tdr. select the transmit format in smr before setting te to 1. ? bit 4?receive enable (re): enables or disables the sci serial receiver. bit 4: re description 0 receiver disabled (initial value) clearing re to 0 does not affect the receive flags (rdrf, fer, per, orer). these flags retain their previous values. 1 receiver enabled serial reception starts when a start bit is detected in asynchronous mode, or synchronous clock input is detected in synchronous mode. select the receive format in smr before setting re to 1.
rev. 3.0, 09/04, page 474 of 1086 ? bit 3?multiprocessor interrupt enable (mpie): enables or disables multiprocessor interrupts. the mpie setting is used only in asynchronous mode, and only if the multiprocessor mode bit (mp) in the serial mode register (smr) is set to 1 during reception. the mpie setting is ignored in synchronous mode or when the mp bit is cleared to 0. bit 3: mpie description 0 multiprocessor interrupts are disabled (normal receive operation) (initial value) [clearing conditions] ? when the mpie bit is cleared to 0 ? when data with mpb = 1 is received 1 multiprocessor interrupts are enabled. receive-data-full interrupt requests (rxi), receive-error interrupt requests (eri), and setting of the rdrf, fer, and orer status flags in the serial status register (ssr) are disabled until data with the multiprocessor bit set to 1 is received. the sci does not transfer receive data from rsr to rdr, does not detect receive errors, and does not set the rdrf, fer, and orer flags in the serial status register (ssr). when it receives data that includes mpb = 1, mpb is set to 1, and the sci automatically clears mpie to 0, generates rxi and eri interrupts (if the tie and rie bits in scr are set to 1), and allows the fer and orer bits to be set. ? bit 2?transmit-end interrupt enable (teie): enables or disables the transmit-end interrupt (tei) requested if tdr does not contain valid transmit data when the msb is transmitted. bit 2: teie description 0 transmit-end interrupt (tei) requests are disabled * (initial value) 1 transmit-end interrupt (tei) requests are enabled * note: * the tei request can be cleared by reading the tdre bit in the serial status register (ssr) after it has been set to 1, then clearing tdre to 0 and clearing the transmit end (tend) bit to 0; or by clearing the teie bit to 0.
rev. 3.0, 09/04, page 475 of 1086 ? bits 1 and 0?clock enable 1 and 0 (cke1, cke0): these bits select the sci clock source and enable or disable clock output from the sck pin. depending on the combination of cke1 and cke0, the sck pin can be used for serial clock output, or serial clock input. select the sck pin function by using the pin function controller (pfc). the cke0 setting is valid only in asynchronous mode, and only when the sci is internally clocked (cke1 = 0). the cke0 setting is ignored in synchronous mode, or when an external clock source is selected (cke1 = 1). for further details on selection of the sci clock source, see table 15.9 in section 15.3, operation. bit 1: cke1 bit 0: cke0 description * 1 asynchronous mode internal clock, sck pin used for input pin (input signal is ignored) or output pin (output level is undefined) * 2 0 0 synchronous mode internal clock, sck pin used for synchronous clock output * 2 asynchronous mode internal clock, sck pin used for clock output * 3 0 1 synchronous mode internal clock, sck pin used for synchronous clock output asynchronous mode external clock, sck pin used for clock input * 4 1 0 synchronous mode external clock, sck pin used for synchronous clock input asynchronous mode external clock, sck pin used for clock input * 4 1 1 synchronous mode external clock, sck pin used for synchronous clock input notes: 1. the sck pin is multiplexed with other functions. use the pin function controller (pfc) to select the sck function for this pin, as well as the i/o direction. 2. initial value. 3. the output clock frequency is the same as the bit rate. 4. the input clock frequency is 16 times the bit rate.
rev. 3.0, 09/04, page 476 of 1086 15.2.7 serial status register (ssr) bit: 7 6 5 4 3 2 1 0 tdre rdrf orer fer per tend mpb mpbt initial value: 1 0 0 0 0 1 0 0 r/w: r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r r r/w note: * only 0 can be written to clear the flag. the serial status register (ssr) is an 8-bit register containing multiprocessor bit values, and status flags that indicate the sci operating status. the cpu can always read and write to ssr, but cannot write 1 in the status flags (tdre, rdrf, orer, per, and fer). these flags can be cleared to 0 only if they have first been read (after being set to 1). bits 2 (tend) and 1 (mpb) are read-only bits that cannot be written. ssr is initialized to h'84 by a power-on reset, and in hardware standby mode and software standby mode. it is not initialized by a manual reset. ? bit 7?transmit data register empty (tdre): indicates that the sci has loaded transmit data from tdr into tsr and new serial transmit data can be written in tdr. bit 7: tdre description 0 tdr contains valid transmit data [clearing conditions] ? when 0 is written to tdre after reading tdre = 1 ? when the dmac writes data in tdr 1 tdr does not contain valid transmit data (initial value) [setting conditions] ? power-on reset, hardware standby mode, or software standby mode ? when the te bit in scr is 0 ? when data is transferred from tdr to tsr, enabling new data to be written in tdr
rev. 3.0, 09/04, page 477 of 1086 ? bit 6?receive data register full (rdrf): indicates that rdr contains received data. bit 6: rdrf description 0 rdr does not contain valid receive data (initial value) [clearing conditions] ? power-on reset, hardware standby mode, or software standby mode ? when 0 is written to rdrf after reading rdrf = 1 ? when the dmac reads data from rdr 1 rdr contains valid received data [setting condition] rdrf is set to 1 when serial data is received normally and transferred from rsr to rdr note: rdr and rdrf are not affected by detection of receive errors or by clearing of the re bit to 0 in the serial control register. they retain their previous contents. if rdrf is still set to 1 when reception of the next data ends, an overrun error (orer) occurs and the receive data is lost. ? bit 5?overrun error (orer): indicates that data reception ended abnormally due to an overrun error. bit 5: orer description 0 receiving is in progress or has ended normally (initial value) clearing the re bit to 0 in the serial control register does not affect the orer bit, which retains its previous value. [clearing conditions] ? power-on reset, hardware standby mode, or software standby mode ? when 0 is written to orer after reading orer = 1 1 a receive overrun error occurred rdr continues to hold the data received before the overrun error, so subsequent receive data is lost. serial receiving cannot continue while orer is set to 1. in synchronous mode, serial transmitting is disabled. [setting condition] orer is set to 1 if reception of the next serial data ends when rdrf is set to 1
rev. 3.0, 09/04, page 478 of 1086 ? bit 4?framing error (fer): indicates that data reception ended abnormally due to a framing error in asynchronous mode. bit 4: fer description 0 receiving is in progress or has ended normally (initial value) clearing the re bit to 0 in the serial control register does not affect the fer bit, which retains its previous value. [clearing conditions] ? power-on reset, hardware standby mode, or software standby mode ? when 0 is written to fer after reading fer = 1 1 a receive framing error occurred when the stop bit length is two bits, only the first bit is checked to see if it is a 1. the second stop bit is not checked. when a framing error occurs, the sci transfers the receive data into rdr but does not set rdrf. serial receiving cannot continue while fer is set to 1. in synchronous mode, serial transmitting is also disabled. [setting condition] fer is set to 1 if the stop bit at the end of receive data is checked and found to be 0 ? bit 3?parity error (per): indicates that data reception (with parity) ended abnormally due to a parity error in asynchronous mode. bit 3: per description 0 receiving is in progress or has ended normally (initial value) clearing the re bit to 0 in the serial control register does not affect the per bit, which retains its previous value. [clearing conditions] ? power-on reset, hardware standby mode, or software standby mode ? when 0 is written to per after reading per = 1 1 a receive parity error occurred when a parity error occurs, the sci transfers the receive data into rdr but does not set rdrf. serial receiving cannot continue while per is set to 1. [setting condition] per is set to 1 if the number of 1s in receive data, including the parity bit, does not match the even or odd parity setting of the parity mode bit (o/ e ) in the serial mode register (smr)
rev. 3.0, 09/04, page 479 of 1086 ? bit 2?transmit end (tend): indicates that when the last bit of a serial character was transmitted, tdr did not contain valid data, so transmission has ended. tend is a read-only bit and cannot be written. bit 2: tend description 0 transmission is in progress [clearing conditions] ? when 0 is written to tdre after reading tdre = 1 ? when the dmac writes data in tdr 1 end of transmission (initial value) [setting conditions] ? power-on reset, hardware standby mode, or software standby mode ? when the te bit in scr is 0 ? if tdre = 1 when the last bit of a one-byte serial transmit character is transmitted ? bit 1?multiprocessor bit (mpb): stores the value of the multiprocessor bit in receive data when a multiprocessor format is selected for receiving in asynchronous mode. mpb is a read- only bit and cannot be written. bit 1: mpb description 0 multiprocessor bit value in receive data is 0 (initial value) if re is cleared to 0 when a multiprocessor format is selected, the mpb retains its previous?value. 1 multiprocessor bit value in receive data is 1 ? bit 0?multiprocessor bit transfer (mpbt): stores the value of the multiprocessor bit added to transmit data when a multiprocessor format is selected for transmitting in asynchronous mode. the mpbt setting is ignored in synchronous mode, when a multiprocessor format is not selected, or when the sci is not transmitting. bit 0: mpbt description 0 multiprocessor bit value in transmit data is 0 (initial value) 1 multiprocessor bit value in transmit data is 1
rev. 3.0, 09/04, page 480 of 1086 15.2.8 bit rate register (brr) bit: 7 6 5 4 3 2 1 0 initial value: 1 1 1 1 1 1 1 1 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the bit rate register (brr) is an 8-bit register that, together with the baud rate generator clock source selected by the cks1 and cks0 bits in the serial mode register (smr), determines the serial transmit/receive bit rate. the cpu can always read and write to brr. brr is initialized to h'ff by a power-on reset and in hardware standby mode. it is not initialized by a manual reset and in software standby mode. each channel has independent baud rate generator control, so different values can be set for each channel. table 15.3 lists examples of brr settings in the asynchronous mode; table 15.4 lists examples of bbr settings in the clock synchronous mode. table 15.3 bit rates and brr settings in asynchronous mode p (mhz) bit rate 10 11.0592 12 (bits/s) n n error (%) n n error (%) n n error (%) 110 2 177 ?0.25 2 195 0.19 2 212 0.03 150 2 129 0.16 2 143 0.00 2 155 0.16 300 2 64 0.16 2 71 0.00 2 77 0.16 600 1 129 0.16 1 143 0.00 1 155 0.16 1200 1 64 0.16 1 71 0.00 1 77 0.16 2400 0 129 0.16 0 143 0.00 0 155 0.16 4800 0 64 0.16 0 71 0.00 0 77 0.16 9600 0 32 ?1.36 0 35 0.00 0 28 0.16 14400 0 21 ?1.36 0 23 0.00 0 25 0.16 19200 0 15 1.73 0 19 0.00 0 19 ?2.34 28800 0 10 ?1.36 0 11 0.00 0 12 0.16 31250 0 9 0.00 0 10 0.54 0 11 0.00 38400 0 7 1.73 0 8 0.00 0 9 ?2.34
rev. 3.0, 09/04, page 481 of 1086 table 15.3 bit rates and brr settings in asynchronous mode (cont) p (mhz) bit rate 12.288 14 14.7456 (bits/s) n n error (%) n n error (%) n n error (%) 110 2 217 0.08 2 248 ?0.17 3 64 0.70 150 2 159 0.00 2 181 0.16 2 191 0.00 300 2 79 0.00 2 90 0.16 2 95 0.00 600 1 159 0.00 1 181 0.16 1 191 0.00 1200 1 79 0.00 1 90 0.16 1 95 0.00 2400 0 159 0.00 0 181 0.16 0 191 0.00 4800 0 79 0.00 0 90 0.16 0 95 0.00 9600 0 39 0.00 0 45 ?0.93 0 47 0.00 14400 0 26 ?1.23 0 29 1.27 0 31 0.00 19200 0 19 0.00 0 22 ?0.93 0 23 0.00 28800 0 12 2.56 0 14 1.27 0 15 0.00 31250 0 11 2.40 0 13 0.00 0 14 ?1.70 38400 0 9 0.00 0 10 3.57 0 11 0.00
rev. 3.0, 09/04, page 482 of 1086 table 15.3 bit rates and brr settings in asynchronous mode (cont) p (mhz) bit rate 16 17.2032 18 (bits/s) n n error (%) n n error (%) n n error (%) 110 3 70 0.03 3 75 0.48 3 79 ?0.12 150 2 207 0.16 2 223 0.00 2 233 0.16 300 2 103 0.16 2 111 0.00 2 116 0.16 600 1 207 0.16 1 223 0.00 1 233 0.16 1200 1 103 0.16 1 111 0.00 1 116 0.16 2400 0 207 0.16 0 223 0.00 0 233 0.16 4800 0 103 0.16 0 111 0.00 0 116 0.16 9600 0 51 0.16 0 55 0.00 0 58 ?0.69 14400 0 34 ?0.79 0 36 0.90 0 38 0.16 19200 0 25 0.16 0 27 0.00 0 28 1.02 28800 0 16 2.12 0 18 ?1.75 0 19 ?2.34 31250 0 15 0.00 0 16 1.20 0 17 0.00 38400 0 12 0.16 0 13 0.00 0 14 ?2.34
rev. 3.0, 09/04, page 483 of 1086 table 15.3 bit rates and brr settings in asynchronous mode (cont) (mhz) bit rate 18.432 19.6608 20 (bits/s) n n error (%) n n error (%) n n error (%) 110 3 81 ?0.22 3 86 0.31 3 88 ?0.25 150 2 239 0.00 2 255 0.00 3 64 0.16 300 2 119 0.00 2 127 0.00 2 129 0.16 600 1 239 0.00 1 255 0.00 2 64 0.16 1200 1 119 0.00 1 127 0.00 1 129 0.16 2400 0 239 0.00 0 255 0.00 1 64 0.16 4800 0 119 0.00 0 127 0.00 0 129 0.16 9600 0 59 0.00 0 63 0.00 0 64 0.16 14400 0 39 0.00 0 42 ?0.78 0 42 0.94 19200 0 29 0.00 0 31 0.00 0 32 ?1.36 28800 0 19 0.00 0 20 1.59 0 21 ?1.36 31250 0 17 2.40 0 19 ?1.70 0 19 0.00 38400 0 14 0.00 0 15 0.00 0 15 1.73
rev. 3.0, 09/04, page 484 of 1086 table 15.4 bit rates and brr settings in synchronous mode p (mhz) bit rate 10 12 16 20 (bits/s) n n n n n n n n 250 ? ? 3 187 3 249 500 ? ? 3 93 3 124 ? ? 1 k ? ? 2 187 2 249 ? ? 2.5 k 1 249 2 74 2 99 2 124 5 k 1 124 1 149 1 199 2 249 10 k 0 249 1 74 1 99 1 124 25 k 0 99 0 119 0 159 1 199 50 k 0 49 0 59 0 79 0 99 100 k 0 24 0 29 0 39 0 49 250 k 0 9 0 11 0 15 0 19 500 k 0 4 0 5 0 7 0 9 1 m 0 2 0 3 0 4 2.5 m 0 0 * 0 0 * ? ? 0 1 5 m 0 0 * note: settings with an error of 1% or less are recommended. legend blank: no setting available ?: setting possible, but error occurs * : continuous transmission/reception not possible the brr setting is calculated as follows: asynchronous mode: n = 64 ? 2 2n?1 ? ? ? 1 p synchronous mode: n = 8 ? ? 1 ? ? ? 1 p
rev. 3.0, 09/04, page 485 of 1086 b: bit rate (bits/s) n: baud rate generator brr setting (0 n 255) pf: peripheral module operating frequency (mhz) (1/2 of system clock) n: baud rate generator input clock (n = 0 to 3) (see the following table for the clock sources and value of n.) smr settings n clock source cks1 cks2 0 p 0 0 1 p /4 0 1 2 p /16 1 0 3 p /64 1 1 the bit rate error in asynchronous mode is calculated as follows: error (%) = ? 1 ? ? ? ? ? 1 p ? ? ? ? ? ? ? table 15.5 indicates the maximum bit rates in asynchronous mode when the baud rate generator is being used for various frequencies. tables 15.6 and 15.7 show the maximum rates for external clock input. table 15.5 maximum bit rates for various frequencies with baud rate generator (asynchronous mode) settings p (mhz) maximum bit rate (bits/s) n n 10 312500 0 0 11.0592 345600 0 0 12 375000 0 0 12.288 384000 0 0 14 437500 0 0 14.7456 460800 0 0 16 500000 0 0 17.2032 537600 0 0 18 562500 0 0 18.432 576000 0 0 19.6608 614400 0 0 20 625000 0 0
rev. 3.0, 09/04, page 486 of 1086 table 15.6 maximum bit rates during external clock input (asynchronous mode) p (mhz) external input clock (mhz) maximum bit rate (bits/s) 10 2.5000 156250 11.0592 2.7648 172800 12 3.0000 187500 12.288 3.0720 192000 14 3.5000 218750 14.7456 3.6864 230400 16 4.0000 250000 17.2032 4.3008 268800 18 4.5000 281250 18.432 4.6080 288000 19.6608 4.9152 307200 20 5.0000 312500 table 15.7 maximum bit rates during external clock input (clock synchronous mode) p (mhz) external input clock (mhz) maximum bit rate (bits/s) 10 1.6667 1666666.7 12 2.0000 2000000.0 14 2.3333 2333333.3 16 2.6667 2666666.7 18 3.0000 3000000.0 20 3.3333 3333333.3 15.2.9 serial direction control register (sdcr) bit: 7 6 5 4 3 2 1 0 ? ? ? ? dir ? ? ? initial value: 1 1 1 1 0 0 1 0 r/w: r r r r r/w r r r the dir bit in the serial direction control register (sdcr) selects lsb-first or msb-first transfer. with an 8-bit data length, lsb-first/msb-first selection is available regardless of the communication mode. with a 7-bit data length, lsb-first transfer must be selected. the description in this section assumes lsb-first transfer.
rev. 3.0, 09/04, page 487 of 1086 sdcr is initialized to h'f2 by a power-on reset and in the hardware standby mode. it is not initialized by a manual reset and in software standby mode. ? bits 7?4?reserved: the write value should always be 1. if 0 is written to these bits, correct operation cannot be guaranteed. ? bit 3?data transfer direction (dir): selects the serial/parallel conversion format. valid for an 8-bit transmit/receive format. bit 3: dir description 0 tdr contents are transmitted in lsb-first order (initial value) receive data is stored in rdr in lsb-first order 1 tdr contents are transmitted in msb-first order receive data is stored in rdr in msb-first order ? bit 2?reserved: the write value should always be 0. if 1 is written to this bit, correct operation cannot be guaranteed. ? bit 1?reserved: this bit is always read as 1, and cannot be modified. ? bit 0?reserved: the write value should always be 0. if 1 is written to this bit, correct operation cannot be guaranteed. 15.2 . 10 i n ver s i o n of s c k p i n s i g n al the signal input from the sck pin and the signal output from the sck pin can be inverted by means of a port control register setting. see section 21, pin function controller (pfc), for details.
rev. 3.0, 09/04, page 488 of 1086 15.3 operation 15.3.1 overview for serial communication, the sci has an asynchronous mode in which characters are synchronized individually, and a synchronous mode in which communication is synchronized with clock pulses. asynchronous synchronous mode and the transmission format are selected in the serial mode register (smr), as shown in table 15.8. the sci clock source is selected by the c/ a bit in the serial mode register (smr) and the cke1 and cke0 bits in the serial control register (scr), as shown in table 15.9. asynchronous mode: ? data length is selectable: seven or eight bits. ? parity and multiprocessor bits are selectable, as well as the stop bit length (one or two bits). these selections determine the transmit/receive format and character length. ? in receiving, it is possible to detect framing errors (fer), parity errors (per), overrun errors (orer), and the break state. ? an internal or external clock can be selected as the sci clock source. ? when an internal clock is selected, the sci operates using the on-chip baud rate generator clock, and can output a clock with a frequency matching the bit rate. ? when an external clock is selected, the external clock input must have a frequency 16 times the bit rate. (the on-chip baud rate generator is not used.) synchronous mode: ? the communication format has a fixed 8-bit data length. ? in receiving, it is possible to detect overrun errors (orer). ? an internal or external clock can be selected as the sci clock source. ? when an internal clock is selected, the sci operates using the on-chip baud rate generator clock, and outputs a serial clock signal to external devices. ? when an external clock is selected, the sci operates on the input serial clock. the on-chip baud rate generator is not used.
rev. 3.0, 09/04, page 489 of 1086 table 15.8 serial mode register settings and sci communication formats smr settings sci communication format mode bit 7 c/ a a a a bit 6 chr bit 5 pe bit 2 mp bit 3 stop data length parity bit multipro- cessor bit stop bit length 0 1 bit 0 1 absent 2 bits 0 1 bit 0 1 1 8-bit present 2 bits 0 1 bit 0 1 absent 2 bits 0 1 bit asynchronous 1 1 0 1 7-bit present absent 2 bits * 0 1 bit 0 * 1 8-bit 2 bits * 0 1 bit asynchronous (multiprocessor format) 0 1 * 1 1 7-bit present 2 bits synchronous 1 * * * * 8-bit absent absent none note: asterisks ( * ) in the table indicate don't-care bits. table 15.9 smr and scr settings and sci clock source selection smr scr settings sci transmit/receive clock mode bit 7 c/ a a a a bit 1 cke1 bit 0 cke0 clock source sck pin function * 0 sci does not use the sck pin 0 1 internal outputs a clock with frequency matching the bit rate 0 asynchronous 0 1 1 external inputs a clock with frequency 16 times the bit rate 0 0 1 internal outputs the serial clock or the inverted serial clock 0 synchronous 1 1 1 external inputs the serial clock or the inverted serial clock note: * select the function in combination with the pin function controller (pfc).
rev. 3.0, 09/04, page 490 of 1086 15.3.2 operation in asynchronous mode in asynchronous mode, each transmitted or received character begins with a start bit and ends with a stop bit. serial communication is synchronized one character at a time. the transmitting and receiving sections of the sci are independent, so full duplex communication is possible. the transmitter and receiver are both double buffered, so data can be written and read while transmitting and receiving are in progress, enabling continuous transmitting and receiving. figure 15.2 shows the general format of asynchronous serial communication. in asynchronous serial communication, the communication line is normally held in the marking (high) state. the sci monitors the line and starts serial communication when the line goes to the space (low) state, indicating a start bit. one serial character consists of a start bit (low), data (lsb first), parity bit (high or low), and stop bit (high), in that order. when receiving in asynchronous mode, the sci synchronizes on the falling edge of the start bit. the sci samples each data bit on the eighth pulse of a clock with a frequency 16 times the bit rate. receive data is latched at the center of each bit. 0 d0d1d2d3d4d5d6d7 1 1 0/1 1 1 (lsb) (msb) serial data start bit 1 bit transmit/receive data 7 or 8 bits one unit of communication data (character or frame) idling (marking) parity bit stop bit 1 or no bit 1 or 2 bits figure 15.2 data format in asynchronous communication (example: 8-bit data with parity and two stop bits)
rev. 3.0, 09/04, page 491 of 1086 transmit/receive formats: table 15.10 shows the 12 communication formats that can be selected in asynchronous mode. the format is selected by settings in the serial mode register (smr). table 15.10 serial communication formats (asynchronous mode) smr bits serial transmit/receive format and frame length chr pe mp stop 1 2 3 4 5 6 7 8 9 10 11 12 0 0 0 0 start 8-bit data stop 0 0 0 1 start 8-bit data stop stop 0 1 0 0 start 8-bit data p stop 0 1 0 1 start 8-bit data p stop stop 1 0 0 0 start 7-bit data stop 1 0 0 1 start 7-bit data stop stop 1 1 0 0 start 7-bit data p stop 1 1 0 1 start 7-bit data p stop stop 0 ? 1 0 start 8-bit data mpb stop 0 ? 1 1 start 8-bit data mpb stop stop 1 ? 1 0 start 7-bit data mpb stop 1 ? 1 1 start 7-bit data mpb stop stop legend start: start bit stop: stop bit p: parity bit mpb: multiprocessor bit note ?: don't-care bits. clock: an internal clock generated by the on-chip baud rate generator or an external clock input from the sck pin can be selected as the sci transmit/receive clock. the clock source is selected by the c/ a bit in the serial mode register (smr) and bits cke1 and cke0 in the serial control register (scr) (table 15.9). when an external clock is input at the sck pin, it must have a frequency equal to 16 times the desired bit rate.
rev. 3.0, 09/04, page 492 of 1086 when the sci operates on an internal clock, it can output a clock signal at the sck pin. the frequency of this output clock is equal to the bit rate. the phase is aligned as in figure 15.3 so that the rising edge of the clock occurs at the center of each transmit data bit. 0 d0d1d2d3d4d5d6d70/1 1 1 1 frame figure 15.3 output clock and communication data phase relationship (asynchronous mode) data transmit/receive operation sci initialization (asynchronous mode): before transmitting or receiving, clear the te and re bits to 0 in the serial control register (scr), then initialize the sci as follows. when changing the operation mode or communication format, always clear the te and re bits to 0 before following the procedure given below. clearing te to 0 sets tdre to 1 and initializes the transmit shift register (tsr). clearing re to 0, however, does not initialize the rdrf, per, fer, and orer flags and receive data register (rdr), which retain their previous contents. when an external clock is used, the clock should not be stopped during initialization or subsequent operation. sci operation becomes unreliable if the clock is stopped.
rev. 3.0, 09/04, page 493 of 1086 figure 15.4 is a sample flowchart for initializing the sci. the procedure is as follows (the steps correspond to the numbers in the flowchart): initialize clear te and re bits to 0 in scr set value in brr set cke1 and cke0 bits in scr (te and re bits are 0) select transmit/receive format in smr and sdcr set te or re to 1 in scr; set rie, tie, teie, and mpie as necessary 1-bit interval elapsed? end 3 1 2 4 no wait yes 1. select the clock source in the serial control register (scr). leave rie, tie, teie, mpie, te, and re cleared to 0. if clock output is selected in asynchronous mode, clock output starts immediately after the setting is made in scr. 2. select the communication format in the serial mode register (smr) and serial direction control register (sdcr). 3. write the value corresponding to the bit rate in the bit rate register (brr) (unless an external clock is used). 4. wait for at least the interval required to transmit or receive one bit, then set te or re in the serial control register (scr) to 1. * also set rie, tie, teie, and mpie as necessary. setting te or re enables the sci to use the txd or rxd pin. note: * in simultaneous transmit/receive operation, the te bit and re bit must be cleared to 0 or set to 1 simultaneously. figure 15.4 sample flowchart for sci initialization transmitting serial data (asynchronous mode): figure 15.5 shows a sample flowchart for transmitting serial data. the procedure is as follows (the steps correspond to the numbers in the flowchart):
rev. 3.0, 09/04, page 494 of 1086 start of transmission initialization read tdre bit in ssr read tend bit in ssr clear te bit in scr to 0; select thetxd pin as an output port with the pfc tend = 1? end of transmission 1 2 3 no yes tdre = 1? write transmit data to tdr and clear tdre bit in ssr to 0 all data transmitted? no yes output break signal? no yes clear port dr to 0 4 yes no 1. sci initialization: set the txd pin using the pfc. after the te bit is set to 1, a frame of 1s is output, and transmission is enabled. 2. sci status check and transmit data write: read the serial status register (ssr), check that the tdre bit is 1, then write transmit data in the transmit data register (tdr) and clear tdre to 0. 3. continue transmitting serial data: read the tdre bit to check whether it is safe to write (if it reads 1); if so, write data in tdr, then clear tdre to 0. when the dmac is started by a transmit-data-empty interrupt request (txi) in order to write data in tdr, the tdre bit is checked and cleared automatically. 4. to output a break at the end of serial transmission, first clear the port data register (dr) to 0, then clear the te bit to 0 in scr and use the pfc to establish the txd pin as an output port. figure 15.5 sample flowchart for transmitting serial data
rev. 3.0, 09/04, page 495 of 1086 in transmitting serial data, the sci operates as follows: 1. the sci monitors the tdre bit in ssr. when tdre is cleared to 0, the sci recognizes that the transmit data register (tdr) contains new data, and loads this data from tdr into the transmit shift register (tsr). 2. after loading the data from tdr into tsr, the sci sets the tdre bit to 1 and starts transmitting. if the transmit-data-empty interrupt enable bit (tie) is set to 1 in scr, the sci requests a transmit-data-empty interrupt (txi) at this time. serial transmit data is transmitted in the following order from the txd pin: a. start bit: one 0-bit is output. b. transmit data: seven or eight bits of data are output, lsb first. c. parity bit or multiprocessor bit: one parity bit (even or odd parity) or one multiprocessor bit is output. formats in which neither a parity bit nor a multiprocessor bit is output can also be selected. d. stop bit: one or two 1-bits (stop bits) are output. e. marking: output of 1-bits continues until the start bit of the next transmit data. 3. the sci checks the tdre bit when it outputs the stop bit. if tdre is 0, the sci loads new data from tdr into tsr, outputs the stop bit, then begins serial transmission of the next frame. if tdre is 1, the sci sets the tend bit to 1 in ssr, outputs the stop bit, then continues output of 1-bits (marking). if the transmit-end interrupt enable bit (teie) in scr is set to 1, a transmit-end interrupt (tei) is requested. figure 15.6 shows an example of sci transmit operation in asynchronous mode.
rev. 3.0, 09/04, page 496 of 1086 01 1 1 0/1 0 1 tdre tend parity bit parity bit serial data start bit data stop bit start bit data stop bit idling (marking) txi interrupt request txi interrupt handler writes data in tdr and clears tdre to 0 txi interrupt request tei interrupt request 1 frame d0 d1 d7 d0 d1 d7 0/1 figure 15.6 sci transmit operation in asynchronous mode (example: 8-bit data with parity and one stop bit) receiving serial data (asynchronous mode): figures 15.7 and 15.8 show a sample flowchart for receiving serial data. the procedure is as follows (the steps correspond to the numbers in the flowchart).
rev. 3.0, 09/04, page 497 of 1086 start of reception initialization read orer, per, and fer bits in ssr read receive data in rdr and clear rdrf bit in ssr to 0 end of reception 1 4 no no yes yes read rdrf bit in ssr rdrf = 1? per, fer, orer = 1? clear re bit in scr to 0 yes no 3 error handling 2 all data received? 1. sci initialization: set the rxd pin using the pfc. 2. receive error handling and break detection: if a receive error occurs, read the orer, per, and fer bits of ssr to identify the error. after executing the necessary error handling, clear orer, per, and fer all to 0. receiving cannot resume if orer, per or fer remain set to 1. when a framing error occurs, the rxd pin can be read to detect the break state. 3. sci status check and receive-data read: read the serial status register (ssr), check that rdrf is set to 1, then read receive data from the receive data register (rdr) and clear rdrf to 0. the rxi interrupt can also be used to determine if the rdrf bit has changed from 0 to 1. 4. continue receiving serial data: read rdr and the rdrf bit and clear rdrf to 0 before the stop bit of the current frame is received. if the dmac is started by a receive-data-full interrupt (rxi) to read rdr, the rdrf bit is cleared automatically so this step is unnecessary. figure 15.7 sample flowchart for receiving serial data (1)
rev. 3.0, 09/04, page 498 of 1086 error handling orer = 1? overrun error handling fer = 1? yes break? no framing error handling per = 1? yes parity error handling clear orer, per, and fer to 0 in ssr end clear re bit in scr to 0 no no no yes yes figure 15.8 sample flowchart for receiving serial data (2)
rev. 3.0, 09/04, page 499 of 1086 in receiving, the sci operates as follows: 1. the sci monitors the communication line. when it detects a start bit (0), the sci synchronizes internally and starts receiving. 2. receive data is shifted into rsr in order from the lsb to the msb. 3. the parity bit and stop bit are received. after receiving these bits, the sci makes the following checks: a. parity check. the number of 1s in the receive data must match the even or odd parity setting of the o/e bit in smr. b. stop bit check. the stop bit value must be 1. if there are two stop bits, only the first stop bit is checked. c. status check. rdrf must be 0 so that receive data can be loaded from rsr into rdr. if the data passes these checks, the sci sets rdrf to 1 and stores the receive data in rdr. if one of the checks fails (receive error), the sci operates as indicated in table 15.11. note: when a receive error occurs, further receiving is disabled. while receiving, the rdrf bit is not set to 1, so be sure to clear the error flags. 4. after setting rdrf to 1, if the receive-data-full interrupt enable bit (rie) is set to 1 in scr, the sci requests a receive-data-full interrupt (rxi). if one of the error flags (orer, per, or fer) is set to 1 and the receive-data-full interrupt enable bit (rie) in scr is also set to 1, the sci requests a receive-error interrupt (eri). table 15.11 receive error conditions and sci operation receive error abbreviation condition data transfer overrun error orer receiving of next data ends while rdrf is still set to 1 in ssr receive data not loaded from rsr into rdr framing error fer stop bit is 0 receive data loaded from rsr into rdr parity error per parity of receive data differs from even/odd parity setting in smr receive data loaded from rsr into rdr figure 15.9 shows an example of sci receive operation in asynchronous mode.
rev. 3.0, 09/04, page 500 of 1086 tdrf fer framing error generates eri interrupt request. 1 frame rxi interrupt handler reads data in rdr and clears rdrf to 0. 01 1 1 0/1 0 1 parity bit parity bit serial data start bit data stop bit start bit data stop bit idling (marking) d0 d1 d7 d0 d1 d7 0/1 rxi interrupt request figure 15.9 sci receive operation (example: 8-bit data with parity and one stop bit) 15.3.3 multiprocessor communication the multiprocessor communication function enables several processors to share a single serial communication line for sending and receiving data. the processors communicate in the asynchronous mode using a format with an additional multiprocessor bit (multiprocessor format). in multiprocessor communication, each receiving processor is addressed by a unique id. a serial communication cycle consists of an id-sending cycle that identifies the receiving processor, and a data-sending cycle. the multiprocessor bit distinguishes id-sending cycles from data-sending cycles. the transmitting processor starts by sending the id of the receiving processor with which it wants to communicate as data with the multiprocessor bit set to 1. next the transmitting processor sends transmit data with the multiprocessor bit cleared to 0. receiving processors skip incoming data until they receive data with the multiprocessor bit set to 1. when they receive data with the multiprocessor bit set to 1, receiving processors compare the data with their ids. the receiving processor with a matching id continues to receive further incoming data. processors with ids not matching the received data skip further incoming data until they again receive data with the multiprocessor bit set to 1. multiple processors can send and receive data in this way. figure 15.10 shows an example of communication among processors using the multiprocessor format.
rev. 3.0, 09/04, page 501 of 1086 communication formats: four formats are available. parity-bit settings are ignored when the multiprocessor format is selected. for details see table 15.8. clock: see the description in the asynchronous mode section. receiving processor a (id = 01) (id = 02) (id = 03) (id = 04) receiving processor b receiving processor c serial communication line h'01 h'aa (mpb = 0) (mpb = 1) id-transmit cycle: receiving processor address serial data mpb: multiprocessor bit transmitting processor receiving processor d data-transmit cycle: data sent to receiving processor specified by id figure 15.10 communication among processors using multiprocessor format (example: sending data h'aa to receiving processor a) data transmit/receive operation transmitting multiprocessor serial data: figure 15.11 shows a sample flowchart for transmitting multiprocessor serial data. the procedure is as follows (the steps correspond to the numbers in the flowchart):
rev. 3.0, 09/04, page 502 of 1086 tdre = 1? write transmit data in tdr and set mpbt in ssr all data transmitted? yes tend = 1? read tend bit in ssr output break signal? yes clear port dr to 0 clear te bit in scr to 0; select thetxd pin function as an output port with the pfc end of transmission yes read tdre bit in ssr clear tdre bit to 0 initialization no no yes no no 1 2 3 4 start of transmission 1. sci initialization: set the txd pin using the pfc. after the te bit is set to 1, a frame of 1s is output, and transmission is enabled. 2. sci status check and transmit data write: read the serial status register (ssr), check that the tdre bit is 1, then write transmit data in the transmit data register (tdr). also set mpbt (multiprocessor bit transfer) to 0 or 1 in ssr. finally, clear tdre to 0. 3. continue transmitting serial data: read the tdre bit to check whether it is safe to write (if it reads 1); if so, write data in tdr, then clear tdre to 0. when the dmac is started by a transmit-data-empty interrupt request (txi) to write data in tdr, the tdre bit is checked and cleared automatically. 4. output a break at the end of serial transmission: set the data register (dr) of the port to 0, then clear te to 0 in scr and set the txd pin function as output port with the pfc. figure 15.11 sample flowchart for transmitting multiprocessor serial data
rev. 3.0, 09/04, page 503 of 1086 in transmitting serial data, the sci operates as follows: 1. the sci monitors the tdre bit in ssr. when tdre is cleared to 0 the sci recognizes that the transmit data register (tdr) contains new data, and loads this data from tdr into the transmit shift register (tsr). 2. after loading the data from tdr into tsr, the sci sets the tdre bit to 1 and starts transmitting. if the transmit-data-empty interrupt enable bit (tie) in scr is set to 1, the sci requests a transmit-data-empty interrupt (txi) at this time. serial transmit data is transmitted in the following order from the txd pin: a. start bit: one 0-bit is output. b. transmit data: seven or eight bits are output, lsb first. c. multiprocessor bit: one multiprocessor bit (mpbt value) is output. d. stop bit: one or two 1-bits (stop bits) are output. e. marking: output of 1-bits continues until the start bit of the next transmit data. 3. the sci checks the tdre bit when it outputs the stop bit. if tdre is 0, the sci loads data from tdr into tsr, outputs the stop bit, then begins serial transmission of the next frame. if tdre is 1, the sci sets the tend bit in ssr to 1, outputs the stop bit, then continues output of 1-bits in the marking state. if the transmit-end interrupt enable bit (teie) in scr is set to 1, a transmit-end interrupt (tei) is requested at this time. figure 15.12 shows an example of sci receive operation in the multiprocessor format. tdre tend txi interrupt handler writes data in tdr and clears tdre to 0 txi interrupt request tei interrupt request 1 frame 01 1 1 0/1 0 1 multiprocessor bit multiprocessor bit serial data start bit data stop bit start bit data stop bit idling (marking) d0 d1 d7 d0 d1 d7 0/1 txi interrupt request figure 15.12 sci multiprocessor transmit operation (example: 8-bit data with multiprocessor bit and one stop bit)
rev. 3.0, 09/04, page 504 of 1086 receiving multiprocessor serial data: figure 15.13 shows a sample flowchart for receiving multiprocessor serial data. the procedure for receiving multiprocessor serial data is as follows (the steps correspond to the numbers in the flowchart): rdrf = 1? fer = 1? or orer =1? rdrf = 1? all data received? no end of reception yes set mpie bit in scr to 1 read rdrf bit in ssr initialization clear re bit in scr to 0 yes no 1 2 3 read orer and fer bits in ssr fer = 1? or orer =1? read rdrf bit in ssr read receive data from rdr is id the station ? s id? no read orer and fer bits in ssr read receive data from rdr no error handling no yes 5 4 yes yes no yes start of reception 1. sci initialization: set the rxd pin using the pfc. 2. id receive cycle: set the mpie bit in the serial control register (scr) to 1. 3. sci status check and compare to id reception: read the serial status register (ssr), check that rdrf is set to 1, then read data from the receive data register (rdr) and compare with the processor ? s own id. if the id does not match the receive data, set mpie to 1 again and clear rdrf to 0. if the id matches the receive data, clear rdrf to 0. 4. receive error handling and break detection: if a receive error occurs, read the orer and fer bits in ssr to identify the error. after executing the necessary error handling, clear both orer and fer to 0. receiving cannot resume if orer or fer remain set to 1. when a framing error occurs, the rxd pin can be read to detect the break state. 5. sci status check and data receiving: read ssr, check that rdrf is set to 1, then read data from the receive data register (rdr). figure 15.13 sample flowchart for receiving multiprocessor serial data (1)
rev. 3.0, 09/04, page 505 of 1086 orer = 1? break? yes framing error handling yes error handling overrun error handling yes fer = 1? clear orer and fer bits in ssr to 0 end no no no clear re bit in scr to 0 figure 15.14 sample flowchart for receiving multiprocessor serial data (2) figure 15.15 shows examples of sci receive operation using a multiprocessor format.
rev. 3.0, 09/04, page 506 of 1086 rdrf mpie rdr value id1 rxi interrupt request (multiprocessor interrupt), mpie = 0 rxi interrupt handler reads data in rdr and clears rdrf to 0 not station ? s id, so mpie is set to 1 again 01 1 1 10 1 serial data start bit stop bit start bit stop bit idling (marking) d0 d1 d7 d0 d1 d7 0 mpb mpb mpb data (id1) data (data 1) rdrf mpie rdr value id2 01 1 1 10 1 mpb mpb serial data start bit data (id2) data (data 2) stop bit start bit stop bit idling (marking) d0 d1 d7 d0 d1 d7 0 rxi interrupt request (multiprocessor interrupt), mpie = 0 rxi interrupt handler reads data in rdr and clears rdrf to 0 station ? s id, so receiving continues, with data received by the rxi interrupt processing routine mpie bit is again set to 1 mpb data 2 id1 (a) id does not match (b) id matches no rxi interrupt, rdr maintains state figure 15.15 sci receive operation (example: 8-bit data with multiprocessor bit and one stop bit)
rev. 3.0, 09/04, page 507 of 1086 15.3.4 synchronous operation in synchronous mode, the sci transmits and receives data in synchronization with clock pulses. this mode is suitable for high-speed serial communication. the sci transmitter and receiver are independent, so full duplex communication is possible while sharing the same clock. the transmitter and receiver are also double buffered, so continuous transmitting or receiving is possible by reading or writing data while transmitting or receiving is in progress. figure 15.16 shows the general format in synchronous serial communication. bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 lsb msb serial clock serial data * * transfer direction one unit (character or frame) of communication data note: * high except in continuous transmitting or receiving. figure 15.16 data format in synchronous communication in synchronous serial communication, each data bit is output on the communication line from one falling edge of the serial clock to the next. data is guaranteed valid at the rising edge of the serial clock. in each character, the serial data bits are transmitted in order from the lsb (first) to the msb (last). after output of the msb, the communication line remains in the state of the msb. in synchronous mode, the sci transmits or receives data by synchronizing with the rise of the serial clock. communication format: the data length is fixed at eight bits. no parity bit or multiprocessor bit can be added. clock: an internal clock generated by the on-chip baud rate generator or an external clock input from the sck pin can be selected as the sci transmit/receive clock. the clock source is selected by the c/ a bit in the serial mode register (smr) and bits cke1 and cke0 in the serial control register (scr). see table 15.9. when the sci operates on an internal clock, it outputs the clock signal at the sck pin. eight clock pulses are output per transmitted or received character. when the sci is not transmitting or receiving, the clock signal remains in the high state. an overrun error occurs only during the
rev. 3.0, 09/04, page 508 of 1086 receive operation, and the serial clock is output until the re bit is cleared to 0. to perform a receive operation in one-character units, select an external clock for the clock source. transmitting and receiving data sci initialization (synchronous mode): before transmitting or receiving, software must clear the te and re bits to 0 in the serial control register (scr), then initialize the sci as follows. when changing the mode or communication format, always clear the te and re bits to 0 before following the procedure given below. clearing te to 0 sets tdre to 1 and initializes the transmit shift register (tsr). clearing re to 0, however, does not initialize the rdrf, per, fer, and orer flags and receive data register (rdr), which retain their previous contents. figure 15.17 is a sample flowchart for initializing the sci. start of initialization clear te and re bits to 0 in scr 1-bit interval elapsed? set te and re to 1 in scr; set rie, tie, teie, and mpie bits yes no 1 set cke1 and cke0 bits in scr (rie, tie, teie, mpie,te, and re are 0) end of initialization wait select transmit/receive format in smr and sdcr set value in brr 2 3 4 1. select the clock source in the serial control register (scr). leave rie, tie, teie, mpie, te, and re cleared to 0. 2. select the communication format in the serial mode register (smr) and serial direction control register (sdcr). 3. write the value corresponding to the bit rate in the bit rate register (brr) (unless an external clock is used). 4. wait for at least the interval required to transmit or receive one bit, then set te or re in the serial control register (scr) to 1. * also set rie, tie, teie, and mpie. the txd, rxd pins becomes usable in response to the pfc corresponding bits and the te, re bit settings. note: * in simultaneous transmit/receive operation, the te bit and re bit must be cleared to 0 or set to 1 simultaneously. figure 15.17 sample flowchart for sci initialization
rev. 3.0, 09/04, page 509 of 1086 transmitting serial data (synchronous mode): figure 15.18 shows a sample flowchart for transmitting serial data. the procedure is as follows (the steps correspond to the numbers in the flowchart): start of transmission read tdre flag in ssr tdre = 1? write transmit data in tdr and clear tdre flag to 0 in ssr all data transmitted? read tend flag in ssr yes no no no yes tend = 1? yes end clear te bit to 0 in scr initialization 2 3 1 1. sci initialization: set the txd pin function with the pfc. 2. sci status check and transmit data write: read ssr, check that the tdre flag is 1, then write transmit data in tdr and clear the tdre flag to 0. 3. to continue transmitting serial data: after checking that the tdre flag is 1, indicating that data can be written, write data in tdr, then clear the tdre flag to 0. when the dmac is activated by a transmit-data-empty interrupt request (txi) to write data in tdr, the tdre flag is checked and cleared automatically. figure 15.18 sample flowchart for serial transmitting
rev. 3.0, 09/04, page 510 of 1086 figure 15.19 shows an example of sci transmit operation. bit 0 bit 1 bit 7 bit 0 bit 1 bit 6 serial clock serial data transfer direction bit 7 txi interrupt handler writes data in tdr and clears tdre to 0 1 frame txi interrupt request tdre tend lsb msb tei interrupt request txi interrupt request figure 15.19 example of sci transmit operation sci serial transmission operates as follows. 1. the sci monitors the tdre bit in ssr. when tdre is cleared to 0 the sci recognizes that the transmit data register (tdr) contains new data and loads this data from tdr into the transmit shift register (tsr). 2. after loading the data from tdr into tsr, the sci sets the tdre bit to 1 and starts transmitting. if the transmit-data-empty interrupt enable bit (tie) in scr is set to 1, the sci requests a transmit-data-empty interrupt (txi) at this time. if clock output mode is selected, the sci outputs eight serial clock pulses. if an external clock source is selected, the sci outputs data in synchronization with the input clock. data is output from the txd pin in order from the lsb (bit 0) to the msb (bit 7). 3. the sci checks the tdre bit when it outputs the msb (bit 7). if tdre is 0, the sci loads data from tdr into tsr, then begins serial transmission of the next frame. if tdre is 1, the sci sets the tend bit in ssr to 1, transmits the msb, then holds the transmit data pin (txd) in the msb state. if the transmit-end interrupt enable bit (teie) in scr is set to 1, a transmit- end interrupt (tei) is requested at this time. 4. after the end of serial transmission, the sck pin is held in the high state.
rev. 3.0, 09/04, page 511 of 1086 receiving serial data (synchronous mode): figures 15.20 and 15.21 show a sample flowchart for receiving serial data. when switching from asynchronous mode to synchronous mode, make sure that orer, per, and fer are cleared to 0. if per or fer is set to 1, the rdrf bit will not be set and both transmitting and receiving will be disabled. the procedure for receiving serial data is as follows (the steps correspond to the numbers in the flowchart): start of reception initialization read orer bit in ssr all data received? end of reception 1 no yes orer = 1? read receive data from rdr and clear rdrf bit in ssr to 0 rdrf = 1? yes yes no clear re bit in scr to 0 no read rdrf bit in ssr error handling 3 4 2 1. sci initialization: set the rxd pin using the pfc. 2. receive error handling: if a receive error occurs, read the orer bit in ssr to identify the error. after executing the necessary error handling, clear orer to 0. transmitting/receiving cannot resume if orer remains set to 1. 3. sci status check and receive data read: read the serial status register (ssr), check that rdrf is set to 1, then read receive data from the receive data register (rdr) and clear rdrf to 0. the rxi interrupt can also be used to determine if the rdrf bit has changed from 0 to 1. 4. continue receiving serial data: read rdr, and clear rdrf to 0 before the msb (bit 7) of the current frame is received. if the dmac is started by a receive-data-full interrupt (rxi) to read rdr, the rdrf bit is cleared automatically so this step is unnecessary. figure 15.20 sample flowchart for serial receiving (1)
rev. 3.0, 09/04, page 512 of 1086 error handling end clear orer bit in ssr to 0 overrun error handling figure 15.21 sample flowchart for serial receiving (2) figure 15.22 shows an example of the sci receive operation. bit 7 bit 0 bit 7 bit 0 bit 1 bit 6 serial clock serial data transfer direction bit 7 read data with rxi interrupt processing routine and clear rdrf bit to 0 1 frame rxi interrupt request rxi interrupt request eri interrupt request generated by overrun error rdrf orer figure 15.22 example of sci receive operation
rev. 3.0, 09/04, page 513 of 1086 in receiving, the sci operates as follows: 1. the sci synchronizes with serial clock input or output and initializes internally. 2. receive data is shifted into rsr in order from the lsb to the msb. after receiving the data, the sci checks that rdrf is 0 so that receive data can be loaded from rsr into rdr. if this check passes, the sci sets rdrf to 1 and stores the receive data in rdr. if the check does not pass (receive error), the sci operates as indicated in table 15.11 and no further transmission or reception is possible. if the error flag is set to 1, the rdrf bit is not set to 1 during reception, even if the rdrf bit is 0 cleared. when restarting reception, be sure to clear the error flag. 3. after setting rdrf to 1, if the receive-data-full interrupt enable bit (rie) is set to 1 in scr, the sci requests a receive-data-full interrupt (rxi). if the orer bit is set to 1 and the receive- data-full interrupt enable bit (rie) in scr is also set to 1, the sci requests a receive-error interrupt (eri). transmitting and receiving serial data simultaneously (synchronous mode): figure 15.23 shows a sample flowchart for transmitting and receiving serial data simultaneously. the procedure is as follows (the steps correspond to the numbers in the flowchart):
rev. 3.0, 09/04, page 514 of 1086 start of transmission/reception initialization read tdre bit in ssr all data transmitted/ received? end of transmission/reception 1 2 no yes tdre = 1? write transmit data in tdr and clear tdre bit in ssr to 0 rdrf = 1? yes no clear te and re bits in scr to 0 yes no read orer bit in ssr error handling 3 orer = 1? yes read receive data in rdr, and clear rdrf bit in ssr to 0 read rdrf bit in ssr 4 5 no 1. sci initialization: set the txd and rxd pins using the pfc. 2. sci status check and transmit data write: read the serial status register (ssr), check that the tdre bit is 1, then write transmit data in the transmit data register (tdr) and clear tdre to 0. the txi interrupt can also be used to determine if the tdre bit has changed from 0 to 1. 3. receive error handling: if a receive error occurs, read the orer bit in ssr to identify the error. after executing the necessary error handling, clear orer to 0. transmitting/receiving cannot resume if orer remains set to 1. 4. sci status check and receive data read: read the serial status register (ssr), check that rdrf is set to 1, then read receive data from the receive data register (rdr) and clear rdrf to 0. the rxi interrupt can also be used to determine if the rdrf bit has changed from 0 to 1. 5. continue transmitting and receiving serial data: read the rdrf bit and rdr, and clear rdrf to 0 before the msb (bit 7) of the current frame is received. also read the tdre bit to check whether it is safe to write (if it reads 1); if so, write data in tdr, then clear tdre to 0 before the msb (bit 7) of the current frame is transmitted. when the dmac is started by a transmit- data-empty interrupt request (txi) to write data in tdr, the tdre bit is checked and cleared automatically. when the dmac is started by a receive-data-full interrupt (rxi) to read rdr, the rdrf bit is cleared automatically. note: in switching from transmitting or receiving to simultaneous transmitting and receiving, clear both te and re to 0, then set both te and re to 1 simultaneously. figure 15.23 sample flowchart for serial transmission and reception
rev. 3.0, 09/04, page 515 of 1086 15.4 sci interrupt sources and the dmac the sci has four interrupt sources: transmit-end (tei), receive-error (eri), receive-data-full (rxi), and transmit-data-empty (txi). table 15.12 lists the interrupt sources and indicates their priority. these interrupts can be enabled and disabled by the tie, rie, and teie bits in the serial control register (scr). each interrupt request is sent separately to the interrupt controller. txi is requested when the tdre bit in ssr is set to 1. txi can start the direct memory access controller (dmac) to transfer data. tdre is automatically cleared to 0 when the dmac writes data in the transmit data register (tdr). rxi is requested when the rdrf bit in ssr is set to 1. rxi can start the dmac to transfer data. rdrf is automatically cleared to 0 when the dmac reads the receive data register (rdr). eri is requested when the orer, per, or fer bit in ssr is set to 1. eri cannot start the dmac. tei is requested when the tend bit in ssr is set to 1. tei cannot start the dmac. where the txi interrupt indicates that transmit data writing is enabled, the tei interrupt indicates that the transmit operation is complete. table 15.12 sci interrupt sources interrupt source description dmac activation priority eri receive error (orer, per, or fer) no rxi receive data full (rdrf) yes txi transmit data empty (tdre) yes tei transmit end (tend) no high low 15.5 usage notes sections 15.5.1 to 15.5.9 provide information concerning use of the sci. 15.5.1 tdr write and tdre flag the tdre bit in the serial status register (ssr) is a status flag indicating loading of transmit data from tdr into tsr. the sci sets tdre to 1 when it transfers data from tdr to tsr. data can be written to tdr regardless of the tdre bit status. if new data is written in tdr when tdre is 0, however, the old data stored in tdr will be lost because the data has not yet been transferred to tsr. before writing transmit data to tdr, be sure to check that tdre is set to 1.
rev. 3.0, 09/04, page 516 of 1086 15.5.2 simultaneous multiple receive errors table 15.13 indicates the state of the ssr status flags when multiple receive errors occur simultaneously. when an overrun error occurs, the rsr contents cannot be transferred to rdr, so receive data is lost. table 15.13 ssr status flags and transfer of receive data ssr status flags receive data transfer receive error status rdrf orer fer per rsr rdr overrun error 1 1 0 0 x framing error 0 0 1 0 o parity error 0 0 0 1 o overrun error + framing error 1 1 1 0 x overrun error + parity error 1 1 0 1 x framing error + parity error 0 0 1 1 o overrun error + framing error + parity error 1 1 1 1 x notes: o: receive data is transferred from rsr to rdr. x: receive data is not transferred from rsr to rdr. 15.5.3 break detection and processing (asynchoronous mode only) break signals can be detected by reading the rxd pin directly when a framing error (fer) is detected. in the break state, the input from the rxd pin consists of all 0s, so fer is set and the parity error flag (per) may also be set. in the break state, the sci receiver continues to operate, so if the fer bit is cleared to 0, it will be set to 1 again. 15.5.4 sending a break signal (asynchoronous mode only) the txd pin becomes a general i/o pin with the i/o direction and level determined by the i/o port data register (dr) and pin function controller (pfc) control register (cr). these conditions allow break signals to be sent. the dr value is substituted for the marking status until the pfc is set. consequently, the output port is set to initially output a 1. to send a break in serial transmission, first clear the dr to 0, then establish the txd pin as an output port using the pfc. when te is cleared to 0, the transmission section is initialized regardless of the present transmission status.
rev. 3.0, 09/04, page 517 of 1086 15.5.5 receive error flags and transmitter operation (synchronous mode only) when a receive error flag (orer, per, or fer) is set to 1, the sci will not start transmitting even if tdre is set to 1. be sure to clear the receive error flags to 0 before starting to transmit. note that clearing re to 0 does not clear the receive error flags. 15.5.6 receive data sampling timing and receive margin in asynchronous mode in asynchronous mode, the sci operates on a base clock with a frequency of 16 times the transfer rate. in receiving, the sci synchronizes internally with the falling edge of the start bit, which it samples on the base clock. receive data is latched on the rising edge of the eighth base clock pulse (figure 15.24). 078150781505 base clock receive data (rxd) synchronization sampling timing data sampling timing 8 clocks 16 clocks start bit ? 7.5 clocks +7.5 clocks d0 d1 figure 15.24 receive data sampling timing in asynchronous mode the receive margin in asynchronous mode can therefore be expressed as: m = 0.5 ? 1 2n d ? 0.5 n ? (l ? 0.5) f ? (1 + f) ? m : receive margin (%) n : ratio of clock frequency to bit rate (n = 16) d : clock duty cycle (d = 0 ? 1.0) l : frame length (l = 9 ? 12) f : absolute deviation of clock frequency from the equation above, if f = 0 and d = 0.5 the receive margin is 46.875%: d = 0.5, f = 0 m = (0.5 ? 1/(2 ? 16)) ? 100% = 46.875%
rev. 3.0, 09/04, page 518 of 1086 this is a theoretical value. a reasonable margin to allow in system designs is 20?30%. 15.5.7 constraints on dmac use ? when using an external clock source for the serial clock, update tdr with the dmac, and then after the elapse of five peripheral clocks (p ) or more, input a transmit clock. if a transmit clock is input in the first four p clocks after tdr is written, an error may occur (figure 15.25). ? before reading the receive data register (rdr) with the dmac, select the receive-data-full (rxi) interrupt of the sci as a start-up source. d0 d1 d2 d3 d4 d5 d6 d7 sck tdre t note: during external clock operation, an error may occur if t is 4 p figure 15.25 example of synchronous transmission with dmac 15.5.8 cautions on synchronous external clock mode ? set te = re = 1 only when external clock sck is 1. ? do not set te = re = 1 until at least four p clocks after external clock sck has changed from 0 to 1. ? when receiving, rdrf is 1 when re is cleared to zero 2.5?3.5 p clocks after the rising edge of the rxd d7 bit sck input, but copying to rdr is not possible. 15.5.9 caution on synchronous internal clock mode when receiving, rdrf is 1 when re is cleared to zero 1.5 p clocks after the rising edge of the rxd d7 bit sck output, but copying to rdr is not possible.
rev. 3.0, 09/04, page 519 of 1086 section 16 controller area network-ii (hcan-ii) 16.1 overview the controller area network-ii (hcan-ii) is a module that controls the controller area network (can) for realtime communication in the car and industrial device systems, etc. it serves to facilitate the hardware/software interface so that engineers involved in the can implementation can ensure the design is successful. the can data link controller function is not described in this document. the following can- specification documents should be referred to. the interfaces from the can controller are described, in so far as they pertain to the connection with the user interface. references: 1. can license specification, robert bosch gmbh, 1992 2. can specification version 2.0, robert bosch gmbh, 1991 3. implementation guide for the can protocol, can specification 2.0 addendum, can in automation, erlangen, germany 4. osek communication specification, version 2.1 revision 1, osek /vdx, 17 th june 1998 16.1.1 features ? supports can specification 2.0a/2.0b and iso-11898-1 ? 31 programmable mailboxes for transmission/reception and one receive-only mailbox (there is a limitation for usage only in mailbox 31) ? sleep mode for low power consumption and automatic recovery from sleep mode by detecting can bus activity ? programmable receive filter mask (standard and extended ids) supported by all mailboxes ? programmable can data rate up to 500 kbits/s (or 1 mbit/s with a limitation) ? transmit message queuing with an on-chip priority sorting mechanism against the problem of priority inversion for realtime applications ? flexible interrupt structure ? read section 16.8, usage notes carefully.
rev. 3.0, 09/04, page 520 of 1086 the following features have been added in the hcan-ii. ? irr0 function to notify a software reset and halt ? halt mode status bit and error passive status bit added to gsr ? supports various test modes ? data frame and remote frame are separated (irr2 is independent from irr1 and rxpr from rfrr) ? when transmitting, the highest priority search is scanned from mailbox 31 down to mailbox 1 ? when receiving, the matching id search is scanned from mailbox 31 down to mailbox 0, and one received message is only stored into one mailbox ? more flexible bcr ? bus off/bus off recover interrupt (irr6) ? others: ? hcan-ii connection method: two connections are available 32-buffer hcan-ii 2 channels (transmit pin 2 and receive pin 2) 64-buffer hcan-ii (wire and) 1 channel (transmit pin 1 and receive pin 1) ? dmac can be activated by a receive message of a mailbox (only mailbox 0 in hcan0)
rev. 3.0, 09/04, page 521 of 1086 16.2 architecture 16.2.1 block diagram the hcan-ii device offers a flexible and sophisticated way to configure and control can frames, supporting can2.0b active and iso-11898. the module is configured of 5 different functional blocks. these are the microprocessor interface (mpi), mailbox, mailbox control, timer, and can interface. figure 16.1 shows a block diagram of the hcan-ii module. the bus interface timing is designed based on the superh peripheral bus interface (p-bus). microprocessor interface mailbox control can interface mailbox 0 to mailbox 31 transmit buffer bcr status signals control signals htxdn hrxdn (n: 0 to 1) 16-bit timer tcntr irr gsr mcr imr txpr0/1 txcr0/1 rxpr0/1 txack0/1 aback0/1 mbimr0/1 mailbox0 mailbox1 mailbox2 mailbox3 mailbox4 mailbox5 mailbox6 mailbox7 tec rec tcr tsr tdcr losr 16-bit bus icri mailbox8 mailbox9 mailbox10 mailbox11 mailbox12 mailbox13 mailbox14 mailbox15 mailbox16 mailbox17 mailbox18 mailbox19 mailbox20 mailbox21 mailbox22 mailbox23 mailbox24 mailbox25 mailbox26 mailbox27 mailbox28 mailbox29 mailbox30 mailbox31 rfpr0/1 data-in[15:0] data-out[15:0] msn/readn/psize address[10:0] clk irq tcmri umsr0/1 ccr ccmax tmr receive buffer figure 16.1 block diagram of hcan-ii (for one channel)
rev. 3.0, 09/04, page 522 of 1086 note: since the hcan-ii is designed based on a 16-bit bus system, longword (32-bit) access is prohibited. thus, word access must be used for all the registers, and word or byte access must be used for the mailboxes. 16.2.2 each block function (1) microprocessor interface (mpi) the mpi allows communication between the host cpu and the hcan's registers/mailboxes to control the memory interface, and the data controller, etc. it also contains the wakeup control logic that detects the can bus state and notifies the mpi and the other parts of the hcan so that the hcan can automatically exit sleep mode. contains registers such as mcr, irr, gsr, and imr. (2) mailboxes the mailboxes are message buffers which are configured of ram. there are 32 mailboxes, and each mailbox stores the following information. ? can message control (stdid, rtr, dlc, ide, etc.) ? can message data (for can data frames) ? local acceptance filter mask (lafm) during reception ? 3-bit mailbox configuration, automatic transmit bit for remote request, new message control bit (3) mailbox control the mailbox control handles the following functions. for receive messages, compares the ids, generates appropriate ram addresses to store messages from the can interface into the mailbox, and sets/clears corresponding registers. to transmit messages, runs the internal arbitration to select the correct priority message which is event-triggered, loads the message from the mailbox into the tx-buffer of the can interface, and sets/clears corresponding registers accordingly. arbitrates mailbox accesses between the host cpu and the can interface or mailbox control. contains registers such as txpr, txcr, txack, aback, rxpr, rfpr, and mbimr. (4) timer the timer is a block which transmits and receives messages at a specific time frame and records the result. the timer is a 16-bit free-running up counter which is controlled by the host cpu. it provides three 16-bit compare match registers. they can generate interrupt signals, set or clear the counter value in the local offset value, and clear messages in the transmission queue. two 16-bit input capture registers are included to record timestamps on can messages and synchronize the timer value globally within a can system. the clock period of this timer offers a wide selection generated from the peripheral clock. contains registers such as tcntr, tcr, tpsr, tdcr, losr, icr0_tm, icr0_cc, icr0_buf, icr1, tcmr0, tcmr1, tcmr2, tmr, ccr, ccr_buf, and cmax. important: the timer function is not supported by the sh7058.
rev. 3.0, 09/04, page 523 of 1086 (5) can interface the can interface supports the requirements for a can bus data link controller which is specified in reference 2 (section 16.1). it fulfils all the functions of a data link layer (dlc layer) as specified by the 7 layers of the osi model. this block provides the receive error counter, transmit error counter, and bit timing set registers, and various test modes corresponding to the can bus specification. this block also stores transmit/receive data for the can data link controller. 16.2.3 pin configuration table 16.1 lists the pin configuration and functions. table 16.1 pin configuration name input/output function hrxd0 input can bus receive signal of channel 0 htxd0 output can bus transmit signal of channel 0 hrxd1 input can bus receive signal of channel 1 htxd1 output can bus transmit signal of channel 1 16.2.4 memory map figures 16.2 (1) and 16.2 (2) show the memory maps of registers which can be accessed by software. base address: channel 0 h'ffffd000, channel 1 h'ffffd800
rev. 3.0, 09/04, page 524 of 1086 h'000 h'002 h'004 h'006 h'008 h'00a h'00c h'020 h'022 h'028 h'02a h'030 h'032 h'038 h'03a h'040 h'042 h'048 h'04a h'050 h'052 h'058 h'05a h'080 h'082 h'084 h'086 h'088 h'08a h'08c h'08e h'090 h'092 h'094 h'096 h'098 h'09a h'09c h'09e h'100 h'106 h'108 h'10a h'10c h'10e h'110 h'120 h'140 h'160 h'2e0 h'2f3 h'300 h'4a0 h'4c0 h'4e0 h'4f3 bit15 bit0 master control register_0 (mcr_0) general status register_0 (gsr_0) hcan-ii_bit timing configuration register 1_0 (hcan-ii_bcr1_0) hcan-ii_bit timing configuration register 0_0 (hcan-ii_bcr0_0) interrupt register_0 (irr_0) interrupt mask register_0 (imr_0) mailbox 0_0 timestamp mailbox 0_0 control (stdid, extid, rtr, ide, dlc, atx, dart, mbc) mailbox 0_0 lafm/mailbox 0_0 ttt mailbox 1_0 control/timestamp/data/lafm mailbox 0_0 data (8 bytes) mailbox 2_0 control/timestamp/data/lafm mailbox 3_0 control/timestamp/data/lafm mailbox 15_0 control/timestamp/data/lafm mailbox 16_0 control/timestamp/data/lafm transmit pending request register 1_0 (txpr1_0) transmit pending request register 0_0 (txpr0_0) transmit cancel register 1_0 (txcr1_0) transmit cancel register 0_0 (txcr0_0) transmit acknowledge register 1_0 (txack1_0) transmit acknowledge register 0_0 (txack0_0) abort acknowledge register 1_0 (aback1_0) abort acknowledge register 0_0 (aback0_0) data frame receive pending register 1_0 (rxpr1_0) data frame receive pending register 0_0 (rxpr0_0) remote frame receive pending register 1_0 (rfpr1_0) remote frame receive pending register 0_0 (rfpr0_0) timer counter register 0 (tcntr0) timer control register_0 (tcr_0) timer status register_0 (tsr_0) timer drift correction register 0 (tdcr0) local offset register 0 (losr0) ccr input capture register 0 (icr0_cc_0) tcntr input capture register 0 (icr0_tm_0) input capture register 1_0 (icr1_0) timer compare match register 0_0 (tcmr0_0) timer compare match register 1_0 (tcmr1_0) timer compare match register 2_0 (tcmr2_0) cycle counter register 0 (ccr0) cycle maximum register 0 (cmax0) timer mode register_0 (tmr_0) cycle counter register double buffer 0 (ccr_buf0) input capture register double buffer 0 (icr0_buf0) mailbox interrupt mask register 1_0 (mbimr1_0) mailbox interrupt mask register 0_0 (mbimr0_0) unread message status register 1_0 (umsr1_0) unread message status register 0_0 (umsr0_0) transmit error counter_0 (tec_0) receive error counter_0 (rec_0) 0 2 4 6 1 3 5 7 mailbox 29_0 control/timestamp/data/lafm mailbox 30_0 control/timestamp/data/lafm mailbox 31_0 control/timestamp/data/lafm figure 16.2 (1) hcan-ii memory map for channel 0 (hcan0)
rev. 3.0, 09/04, page 525 of 1086 h'800 h'802 h'804 h'806 h'808 h'80a h'80c h'820 h'822 h'828 h'82a h'830 h'832 h'838 h'83a h'840 h'842 h'848 h'84a h'850 h'852 h'858 h'85a h'880 h'882 h'884 h'886 h'888 h'88a h'88c h'88e h'890 h'892 h'894 h'896 h'898 h'89a h'89c h'89e h'900 h'906 h'908 h'90a h'90c h'90e h'910 h'920 h'940 h'960 h'ae0 h'af3 h'b00 h'ca0 h'cc0 h'ce0 h'cf3 bit15 bit0 master control register_1 (mcr_1) general status register_1 (gsr_1) hcan-ii_bit timing configuration register 1_1 (hcan-ii_bcr1_1) hcan-ii_bit timing configuration register 0_1 (hcan-ii_bcr0_1) interrupt register_1 (irr_1) interrupt mask register_1 (imr_1) mailbox 0_1 timestamp mailbox 0_1 control (stdid, extid, rtr, ide, dlc, atx, dart, mbc) mailbox 0_1 lafm/mailbox 0_1 ttt mailbox 1_1 control/timestamp/data/lafm mailbox 0_1 data (8 bytes) mailbox 2_1 control/timestamp/data/lafm mailbox 3_1 control/timestamp/data/lafm mailbox 15_1 control/timestamp/data/lafm mailbox 16_1 control/timestamp/data/lafm transmit pending request register 1_1 (txpr1_1) transmit pending request register 0_1 (txpr0_1) transmit cancel register 1_1 (txcr1_1) transmit cancel register 0_1 (txcr0_1) transmit acknowledge register 1_1 (txack1_1) transmit acknowledge register 0_1 (txack0_1) abort acknowledge register 1_1 (aback1_1) abort acknowledge register 0_1 (aback0_1) data frame receive pending register 1_1 (rxpr1_1) data frame receive pending register 0_1 (rxpr0_1) remote frame receive pending register 1_1 (rfpr1_1) remote frame receive pending register 0_1 (rfpr0_1) timer counter register 1 (tcntr1) timer control register_1 (tcr_1) timer status register_1 (tsr_1) timer drift correction register 1 (tdcr1) local offset register 1 (losr1) ccr input capture register 1 (icr1_cc_1) tcntr input capture register 1 (icr1_tm_1) input capture register 1_1 (icr1_1) timer compare match register 0_1 (tcmr1_1) timer compare match register 1_1 (tcmr1_1) timer compare match register 2_1 (tcmr2_1) cycle counter register 1 (ccr1) cycle maximum register 1 (cmax1) timer mode register_1 (tmr_1) cycle counter register double buffer 1 (ccr_buf1) input capture register double buffer 1 (icr0_buf1) mailbox interrupt mask register 1_1 (mbimr1_1) mailbox interrupt mask register 0_1 (mbimr0_1) unread message status register 1_1 (umsr1_1) unread message status register 0_1 (umsr0_1) transmit error counter_1 (tec_1) receive error counter_1 (rec_1) 0 2 4 6 1 3 5 7 mailbox 29_1 control/timestamp/data/lafm mailbox 30_1 control/timestamp/data/lafm mailbox 31_1 control/timestamp/data/lafm figure 16.2 (2) hcan-ii memory map for channel 1 (hcan1)
rev. 3.0, 09/04, page 526 of 1086 16.3 mailboxes 16.3.1 mailbox configuration mailboxes play a role as message buffers to transmit/receive can frames. each mailbox is comprised of 4 identical storage fields that are 1): message control, 2): message data, 3): timestamp, and 4): local acceptance filter mask (lafm)/transmission trigger time. table 16.2 shows the memory map for each mailbox. note: the message control (stdid/extid/rtr/zde), timestamp, and lafm/transmission trigger time fields can only be accessed in word size (16 bits), whereas the message control (nmc/atx/mbc/dlc) and the message data area can be accessed in word (16- bit) or byte (8-bit) size. also, when the setting of the mbc bits makes the mailbox inactive, all settings other than the mbc bits must be initialized to 0 because an unused mailbox affects the ram configuration. when the lafm is not used to receive messages, it must be cleared to 0.
rev. 3.0, 09/04, page 527 of 1086 table 16.2 mailbox configuration address control timestamp data lafm/trigger time mailbox 6 bytes 2 bytes 8 bytes 4 bytes 0 (receive only) 100 ? 105 106 ? 107 108 ? 10f 110 ? 113 1 120 ? 125 126 ? 127 128 ? 12f 130 ? 133 2 140 ? 145 146 ? 147 148 ? 14f 150 ? 153 3 160 ? 165 166 ? 167 168 ? 16f 170 ? 173 4 180 ? 185 186 ? 187 188 ? 18f 190 ? 193 51a0 ? 1a5 1a6 ? 1a7 1a8 ? 1af 1b0 ? 1b3 61c0 ? 1c5 1c6 ? 1c7 1c8 ? 1cf 1d0 ? 1d3 71e0 ? ie5 1e6 ? 1e7 1e8 ? 1ef 1f0 ? 1f3 8 200 ? 205 206 ? 207 208 ? 20f 210 ? 213 9 220 ? 225 226 ? 227 228 ? 22f 230 ? 233 10 240 ? 245 246 ? 247 248 ? 24f 250 ? 253 11 260 ? 265 266 ? 267 268 ? 26f 270 ? 273 12 280 ? 285 286 ? 287 288 ? 28f 290 ? 293 13 2a0 ? 2a5 2a6 ? 2a7 2a8 ? 2af 2b0 ? 2b3 14 2c0 ? 2c5 2c6 ? 2c7 2c8 ? 2cf 2d0 ? 2d3 15 2e0 ? 2e5 2e6 ? 2e7 2e8 ? 2ef 2f0 ? 2f3 16 300 ? 305 306 ? 307 308 ? 30f 310 ? 313 17 320 ? 325 326 ? 327 328 ? 32f 330 ? 333 18 340 ? 345 346 ? 347 348 ? 34f 350 ? 353 19 360 ? 365 366 ? 367 368 ? 36f 370 ? 373 20 380 ? 385 386 ? 387 388 ? 38f 390 ? 393 21 3a0 ? 3a5 3a6 ? 3a7 3a8 ? 3af 3b0 ? 3b3 22 3c0 ? 3c5 3c6 ? 3c7 3c8 ? 3cf 3d0 ? 3d3 23 3e0 ? 3e5 3e6 ? 3e7 3e8 ? 3ef 3f0 ? 3f3 24 400 ? 405 406 ? 407 408 ? 40f 410 ? 413 25 420 ? 425 426 ? 427 428 ? 42f 430 ? 433 26 440 ? 445 446 ? 447 448 ? 44f 450 ? 453 27 460 ? 465 466 ? 467 468 ? 46f 470 ? 473 28 480 ? 485 486 ? 487 488 ? 48f 490 ? 493 29 4a0 ? 4a5 4a6 ? 4a7 4a8 ? 4af 4b0 ? 4b3 30 4c0 ? 4c5 4c6 ? 4c7 4c8 ? 4cf 4d0 ? 4d3 31 4e0 ? 4e5 4e6 ? 4e7 4e8 ? 4ef 4f0 ? 4f3
rev. 3.0, 09/04, page 528 of 1086 mailbox 0 is a receive-only mailbox, and all the rest of mailbox 1 to mailbox 31 can operate as both receive and transmit mailboxes according to the mbc (mailbox configuration) bits in the message control. figure 16.3 shows the configuration of a mailbox in detail. important: if mailbox 31 is used as a transmit buffer, there is a usage limitation. for details, see section 16.8, usage notes. 1514131211109876543210 0 rtr ide ccm tte nmc atx dart 0 tct cbe cle dlc[3:0] extid[15:0] stdid[10:0] exidt[17:16] mbc[2:0] msg_data_1 msg_data_3 msg_data_5 msg_data_7 msg_data_0 (first rx/tx byte) msg_data_2 msg_data_4 msg_data_6 notes: 1. all bits shadowed in gray are reserved and the write value should be 0. the value read as the initial value is not gu aranteed. 2. atx, dart, and cle are not supported by mailbox 0 and the mbc setting of mailbox 0 is limited. 3. if the can bus is configured in little endian (mcr4 = 1), transmission is started from msg_data_1 instead of msg_data_0 (i.e. the sequence becomes: msg_data_1, msg_data_0, msg_data_3, msg_data_2, msg_data_5, msg_data_4, msg_data_7, and msg_data_ 6). 4. x/n: 0 to 31 (indicates the mailbox number) register name address data bus timestamp[15:0] access size field name mbx[0] to [1] mbx[2] to [3] mbx[4] to [5] mbx[6] mbx[7] to [8] mbx[9] to [10] mbx[11] to [12] mbx[13] to [14] mbx[15] to [16] mbx[17] to [18] hcan0 h'100+n 32 h'102+n 32 h'104+n 32 h'106+n 32 h'108+n 32 h'10a+n 32 h'10c+n 32 h'10e+n 32 h'110+n 32 h'112+n 32 hcan1 h'900+n 32 h'902+n 32 h'904+n 32 h'906+n 32 h'908+n 32 h'90a+n 32 h'90c+n 32 h'90e+n 32 h'910+n 32 h'912+n 32 local acceptance filter mask 0 (lafm0)/tx trigger time 0 (ttt0) local acceptance filter mask 1 (lafm1)/tx trigger time 1 (ttt1) 16 bits 16 bits 8/16 bits 16 bits 8/16 bits 8/16 bits 8/16 bits 8/16 bits 16 bits 16 bits control timestamp data lafm/tx trigger control figure 16.3 mailbox-n configuration
rev. 3.0, 09/04, page 529 of 1086 16.3.2 message control field register name address bit bit name description 15 ? reserved the write value should be 0. the read value is not guaranteed. 14 to 4 stdid [10:0] standard id set the id (standard id) of data frames and remote frames. 3 rtr remote transmission request distinguishes between data frames and remote frames. this bit is overwritten by receive can frames depending on data frames or remote frames. important: note that, when the atx bit is set with the setting mbc = 001 the rtr bit cannot be set. when a remote frame is received, the host cpu can be notified by the corresponding rfpr or irr2 (remote frame request interrupt), however, as the hcan needs to transmit the current message as a data frame, the rtr bit remains 0. 0: data frame 1: remote frame 2 ide id extension distinguishes between the standard format and extended format of can data frames and remote frames. 0: standard format 1: extended format mbx[0], mbx[1] * h'100 + n 32 1, 0 extid [17:16] mbx[2], mbx[3] * h'102 + n 32 15 to 0 extid [15:0] extended id set the id (extended id) of data frames and remote frames. note: * x/n: 0 to 31 (indicates the mailbox number)
rev. 3.0, 09/04, page 530 of 1086 register name address bit bit name description 15 ccm can-id compare match when this bit is set, message reception in the corresponding mailbox can generate two triggers. if tcr9 is set to 1, tcr14 is cleared to freeze icr0. if tcr10 is set to 1, tcntr (timer counter register) is automatically cleared and the losr (local offset register) value is set. important: this function is not supported by the sh7058. thus the write value should be 0. mbx[4], mbx[5] * h'104 + n 32 14 tte time trigger enable when this bit is set, a mailbox in which txpr has been already set transmits a message at a time set in the tx trigger time field. important: if this bit is set, a failure occurs during message transmission. therefore setting is prohibited. the write value should be 0. the value read as the initial value is not guaranteed.
rev. 3.0, 09/04, page 531 of 1086 register name address bit bit name description mbx[4], mbx[5] * h'104 + n 32 13 nmc new message control when this bit is cleared, a mailbox in which pxpr/pfpr has been already set does not store the new message but retains the previous one and sets the umsr corresponding bit. when this bit is set, a mailbox in which pxpr/pfpr has been already set stores the new message and sets the umsr corresponding bit. if a message is received in a mailbox in overwrite mode (nmc = 1), the host cpu must perform an additional check at the end of the data reading from the mailbox in order to guarantee that the mailbox data have not been corrupted during such operation by another receive message. the additional check, to be performed at the end of the mailbox access, consists in verifying that the associated bit of umsr has not been set and so no overwrite has occurred; in case such bit is set data have been corrupted and so the message must be discarded. note: * x/n: 0 to 31 (indicates the mailbox number)
rev. 3.0, 09/04, page 532 of 1086 register name address bit bit name description 12 atx automatic transmission of data frame when this bit is set to 1 and a remote frame is received in the mailbox, a data frame is automatically transmitted from the same mailbox using the current contents of the message data. the scheduling of transmission is controlled by the can id. in order to use this function, the mbc[2:0] bits should be set to 001. when transmission is performed by this function, the dlc (data length code) to be used is the one that has been received. important: note that, when this function is used, the rtr bit is not set even if a remote frame is received. when a remote frame is received, the host cpu will be notified by rfpr or irr2 (remote frame request interrupt), however, as the hcan needs to transmit the current message as a data frame, the rtr bit remains 0. mbx[4], mbx[5] * h'104 + n 32 11 dart disable automatic retransmission when this bit is set, it disables the automatic retransmission of a message in the event of an error on the can bus or an arbitration lost on the can bus. when this function is used, the corresponding txcr bit is automatically set at the start of transmission. when this bit is cleared, the hcan tries to transmit the message as many times as required until it is successfully transmitted or it is cancelled by the txcr. important: this function is not supported by the sh7058. thus the write value should be 0. the value read as the initial value is not guaranteed. note: * x/n: 0 to 31 (indicates the mailbox number)
rev. 3.0, 09/04, page 533 of 1086 register name address bit bit name description 10 to 8 mbc[2:0] mailbox configuration mailbox functions are set as shown in table 16.3. when mbc = 111, the mailbox is inactive, i.e., it does not receive or transmit a message regardless of txpr or other settings. when mbc = 000 and the tte bit is set, the tx-trigger time field becomes available. the mbc = 110 or 011 setting is prohibited. when mbc is set to any other value, the lafm field becomes available. important: mb0 should be used as receive-only (mbc = 010). 7 ? reserved the write value should be 0. the read value is not guaranteed. mbx[4], mbx[5] * h'104 + n 32 6 tct timer counter transfer when this bit is set, a mailbox is set for transmission, and the dlc is set to 4, the tcntr value, at the sof, is embedded in the second and third bytes of the message data, instead of msg_data_2 and msg_data_3, and the cycle_count in the first byte instead of msg_data_0[3:0] when this mailbox starts transmission. this function will be useful when the hcan performs a time master role to transmit the time reference message. for example, considering that two hcan controllers are connected in the same network and that the receiver stores the message in mailbox n, the data format is shown as figure 16.4 depending on the endian setting for the can bus (mcr4). important: this function is not supported by the sh7058. thus the write value should be 0. the value read as the initial value is not guaranteed. note: * x/n: 0 to 31 (indicates the mailbox number)
rev. 3.0, 09/04, page 534 of 1086 register name address bit bit name description 5 cbe can bus error an external fault-tolerant can transceiver can be used together with the hcan module. if the error output pin of the transceiver (normally active low) is connected to the can_nerr pin of this lsi, the value of the can_nerr pin is stored into this bit at the end of each transmission/reception (if the message is stored). the inverted value of the can_nerr pin is set to this bit. if the error output pin is active high, the setting value is not inverted. when this bit is set, it indicates a potential physical error with the can bus. as the can_nerr value is updated after the transmission or reception in the corresponding mailbox, non-interrupt is dedicated to this function but instead the normal transmit end interrupt (irr6) and normal receive end interrupt (irr2) should be considered. important: this function is not supported by the sh7058. thus the write value should be 0. the value read as the initial value is not guaranteed. mbx[4], mbx[5] * h'104 + n 32 4 cle transmit clear enable when this bit is set, message reception in the corresponding mailbox cancels the wait messages in the transmission queue. this action is notified by irr8 and aback. important: this function is not supported by the sh7058. thus the write value should be 0. the value read as the initial value is not guaranteed. note: * x/n: 0 to 31 (indicates the mailbox number)
rev. 3.0, 09/04, page 535 of 1086 register name address bit bit name description mbx[4], mbx[5] * h'104 + n 32 3 to 0 dlc[3:0] data length code indicate the number of data bytes to be transmitted in a data frame. dlc[3:0] data length 0000 0 bytes 0001 1 byte 0010 2 bytes 0011 3 bytes 0100 4 bytes 0101 5 bytes 0110 6 bytes 0111 7 bytes 1xxx 8 bytes [legend] x: don?t care note: * x/n: 0 to 31 (indicates the mailbox number) table 16.3 mailbox configuration (setting of mbc[2:0] bits) mbc[2] mbc[1] mbc[0] data frame transmission remote frame transmission data frame reception remote frame reception description 000yes yes no no ? not allowed for mailbox 0 0 0 1 yes yes no yes ? can be used with atx ? not allowed for mailbox 0 ? lafm can be used 010no no yes yes ? allowed for mailbox 0 ? lafm can be used 0 1 1 setting prohibited 1 0 0 no yes yes yes ? not allowed for mailbox 0 ? lafm can be used 101no yes yes no ? not allowed for mailbox 0 ? lafm can be used 1 1 0 setting prohibited 1 1 1 mailbox inactive
rev. 3.0, 09/04, page 536 of 1086 important: if mailbox 31 is used as a transmit buffer, there is a usage limitation. for details, see section 16.8, usage notes. message data field when tct = 1: 1514131211109876543210 mbx[7] to [8] mbx[9] to [10] mbx[11] to [12] mbx[13] to [14] cycle_counter (first rx/tx byte) tcntr[7:0] msg_data_4 msg_data_6 msg_data_1 tcntr[15:8] msg_data_5 msg_data_7 8/16 bits 8/16 bits 8/16 bits 8/16 bits msg_data_1 tcntr[15:8] msg_data_5 msg_data_7 cycle_counter (first rx/tx byte) tcntr[7:0] msg_data_4 msg_data_6 mbx[7] to [8] mbx[9] to [10] mbx[11] to [12] mbx[13] to [14] h'108+n 32 h'10a+n 32 h'10c+n 32 h'10e+n 32 h'908+n 32 h'90a+n 32 h'90c+n 32 h'90e+n 32 register name address data bus big endian little endian access size field name hcan0 h'108+n 32 h'10a+n 32 h'10c+n 32 h'10e+n 32 hcan1 h'908+n 32 h'90a+n 32 h'90c+n 32 h'90e+n 32 data 8/16 bits 8/16 bits 8/16 bits 8/16 bits data [legend] x/n: 0 to 31 (indicates the mailbox number) figure 16.4 message data field
rev. 3.0, 09/04, page 537 of 1086 timestamp fields: records the timestamp on messages for transmission/reception. the timestamp will be a useful function to monitor if messages are received/transmitted within expected schedule or if messages for transmission are scheduled in the appropriate order. register name address bit bit name description mbx[6] * h'106 + n 32 15 to 0 timestamp [15:0] message reception: during message reception, when the sof or eof is detected, icr1 (input capture register 1) always captures the tcntr (timer counter register) value or the value of cycle_counter + tcntr[15:4], depending on the value of bit 3 in tmr (timer mode register), at either sof or eof depending on the value in tcr13 (timer control register), and the icr1 value is stored into the timestamp field of the corresponding mailbox. important: capturing at the sof is not supported by the sh7058. thus tcr13 should be set to eof detection mode. message transmission: during message transmission, the tcntr (timer counter register) value or the value of cycle_counter + tcntr[15:4], depending on the value of bit 3 in tmr (timer mode register) is captured when either the txpr bit or txack bit is set depending on the value in tcr12, and the captured value is stored into the timestamp field of the corresponding mailbox. important: capturing when the txpr bit is set is not supported by the sh7058. activation of the tcnr (timer) causes a problem in the sh7058 (timer usage is prohibited). therefore, the timestamp function is not supported. the write value should be 0. the value read as the initial value is not guaranteed. note: * x/n: 0 to 31 (indicates the mailbox number)
rev. 3.0, 09/04, page 538 of 1086 16.3.3 message data fields register name address bit bit name description mbx[7], mbx[8] * h'108 + n' 32 15 to 8, 7 to 0 msg_data_0, msg_data_1 mbx[9], mbx[10] * h'10a + n 32 15 to 8, 7 to 0 msg_data_2, msg_data_3 mbx[11], mbx[12] * h'10c + n 32 15 to 8, 7 to 0 msg_data_4, msg_data_5 mbx[13], mbx[14] * h'10e + n 32 15 to 8, 7 to 0 msg_data_6, msg_data_7 store the can message data that is transmitted or received. msg_data_0 corresponds to the first data byte that is transmitted or received. note: * x/n: 0 to 31 (indicates the mailbox number) 16.3.4 local acceptance filter mask (lafm)/tx-trigger time (ttt) this area is used as the local acceptance filter mask (lafm) for receive boxes or as the tx-trigger time (ttt) for transmit boxes. lafm: when the mbc bits are set to 001, 010, 011, 100, and 101, this field becomes the lafm field. the lafm is comprised of two 16-bit readable/writable areas. it allows a mailbox to accept more than one receive ids. 15 0 stdid[10:0] extid[15:0] 0 0 extid[17:16] 14131211109876543210 mbx[15], mbx[16] mbx[17], mbx[18] 16 bits 16 bits register name address data bus access size field name hcan0 h'110+n 32 h'112+n 32 hcan1 h'910+n 32 h'912+n 32 lafm field [legend] x/n: 0 to 31 (indicates the mailbox number) figure 16.5 acceptance filter if a bit is set in the lafm, the corresponding bit of a received can id is ignored when the hcan searches a mailbox with the matching can id. if the bit is cleared, the corresponding bit of a received can id must match the std_id/ext_id set in the mailbox to be stored. the configuration of the lafm is same as the message control in a mailbox. if this function is not required, it must be filled with 0. notes: 1. when the lafm is used, the hcan starts to find a matching id from mailbox 31 down to mailbox 0. as soon as the hcan finds one, it stops the search and stores the message into the mailbox. this means that a received message can only be stored into one mailbox. 2. when a message is received and a matching mailbox is found, the whole message is stored into the mailbox. this means that, if the lafm is used, the std_id, rtr, ide,
rev. 3.0, 09/04, page 539 of 1086 and ext_id differ to the ones originally set as they are updated with the std_id, rtr, ide, and ext_id of the received message. 3. if the setting of the lafm register that has already been set is changed, the hcan should be set to halt mode before changing the setting. do not access the lafm during operation. 4. do not access the undefined addresses. correct operation cannot be guaranteed. lafm field: register name address bit ? ? ? ? bit name description 15 ? reserved the write value should be 0. the value read as the initial value is not guaranteed. 14 to 4 stdid_lafm [10:0] filter mask bits[10:0] for can base id[10:0] 0: corresponding bit to can base id set in mailbox is valid 1: corresponding bit to can base id set in mailbox is invalid 3, 2 ? reserved the write value should be 0. the value read as the initial value is not guaranteed. mbx[15], mbx[16] h'110 + n 32 1, 0 extid_lafm [17:16] filter mask bits[17:16] for can extended id[17:16] 0: corresponding bit to extended can base id is valid 1: corresponding bit to extended can base id is invalid mbx[17], mbx[18] h'112 + n 32 15 to 0 extid_lafm [15:0] filter mask bits[15:0] for can extended id[15:0] 0: corresponding bit to extended can base id is valid 1: corresponding bit to extended can base id is invalid note: * x/n: 0 to 31 (indicates the mailbox number) ttt: when the mbc bits are set to 000, this field becomes a tx-trigger time (ttt) field. the ttt is comprised of two 16-bit readable/writable areas.
rev. 3.0, 09/04, page 540 of 1086 15 0 0 0 0 0 0 0 0 tx-trigger time (absolute value) offset[3:0] rep_count[3:0] 14131211109876543210 mbx[15], mbx[16] mbx[17], mbx[18] 16 bits 16 bits register name address data bus access size field name hcan0 h'110+n 32 h'112+n 32 hcan1 h'910+n 32 h'912+n 32 tx-trigger control field [legend] x/n: 0 to 31 (indicates the mailbox number) figure 16.6 tx-trigger control field tx-trigger time field: register name address bit bit name description mbx[15], mbx[16] * h'110 + n 32 15 to 0 ttt tx-trigger time set the time that triggers message transmission using the absolute value. 15 to 12 ? reserved the write value should be 0. the value read as the initial value is not guaranteed. 11 to 8 offset offset 7 to 4 ? reserved the write value should be 0. the value read as the initial value is not guaranteed. mbx[17], mbx[18] * h'112 + n 32 3 to 0 rep_count [3:0] repeat counter set the transmit cycle. note: * x/n: 0 to 31 (indicates the mailbox number) the first 16-bit area sets the time that triggers message transmission using the absolute value. the second 16-bit area sets the basic cycle in the system matrix where the transmission must start (offset) and in the system matrix of the frequency for periodic transmission. when txpr is set, the corresponding tx-trigger time (ttt), repeat counter, and offset are downloaded into an internal register. when the internal ttt register matches the tcntr value and the internal offset matches the ccr (cycle counter register) value, the corresponding mailbox automatically starts transmission. in order to enable this function, the tte (time trigger enable) bit must be enabled (set to 1) and the timer (tcntr) must be running (tcr15 = 1). when the tte is cleared to 0 and the corresponding txpr bit is set, it joins the queue for transmission immediately. if the repeat counter is not 0, transmission occurs periodically every rep_count's basic cycle from ccr = offset to ccr = max_cycle. in such case once txpr is set by software, the hcan does not clear the corresponding txpr bit to carry on performing the periodic transmission. in order to stop the periodic transmission, txpr must be cleared by txcr or the rep_count field must be cleared. if the repeat counter is 0, transmission occurs only once at the programmed basic cycle (i.e. ccr = offset and tcntr = ttt).
rev. 3.0, 09/04, page 541 of 1086 the tx-trigger time must not be set outside the tcntr cycle if the compare-match timer clear/set function is used (by tcmr0 or ccm). during a time triggered transmission, only another one time triggered transmission can be triggered and a minimum difference of 200 peripheral clock cycles between them is allowed. 16.4 hcan control registers the following sections describe the hcan control registers. table 16.4 shows the address map. note: these registers can only be accessed in word size (16 bits). table 16.4 hcan control registers channel address register name abbreviation access size (bits) h'ffffd000 master control register_0 mcr_0 16 h'ffffd002 general status register_0 gsr_0 16 h'ffffd004 hcan-ii_bit timing configuration register 1_0 hcan-ii_ bcr1_0 16 h'ffffd006 hcan-ii_bit timing configuration register 0_0 hcan-ii_ bcr0_0 16 h'ffffd008 interrupt register_0 irr_0 16 h'ffffd00a interrupt mask register_0 imr_0 16 0 h'ffffd00c transmit error counter_0/ receive error counter_0 tec_0/rec_0 16 h'ffffd800 master control register_1 mcr_1 16 h'ffffd802 general status register_1 gsr_1 16 h'ffffd804 hcan-ii_bit timing configuration register 1_1 hcan-ii_ bcr1_1 16 h'ffffd806 hcan-ii_bit timing configuration register 0_1 hcan-ii_ bcr0_1 16 h'ffffd808 interrupt register_1 irr_1 16 h'ffffd80a interrupt mask register_1 imr_1 16 1 h'ffffd80c transmit error counter_1/ receive error counter_1 tec_1/rec_1 16
rev. 3.0, 09/04, page 542 of 1086 16.4.1 register descriptions legends for register descriptions are as follows: initial value : register value after a reset ? : undefined value r/w : readable/writable bit. the write value can be read. r : read-only bit. the write value should always be 0. r/wc0 : readable/writable bit. if 0 is written to this bit, the bit is initialized; if 1 is written to this bit, it is ignored. r/wc1 : readable/writable bit. if 1 is written to this bit, the bit is initialized; if 0 is written to this bit, it is ignored. w : write-only bit. reading prohibited. if reserved, the write value should always be 0. ?/w : write-only bit. the read value is undefined. 16.4.2 master control register_n (mcr_n) (n = 0, 1) the master control register (mcr) is a 16-bit readable/writable register that controls the hcan. bit:1514131211109876543210 tst 7 tst 6 tst 5 tst 4 tst 3 tst 2 tst 1 tst 0 mcr 7 mcr 5 mcr 4 mcr 2 mcr 1 mcr 0 initial value:0000000 0 00000001 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w ? r/w r/w ? r/w r/w r/w bit bit name initial value r/w description 15 tst7 0 r/w test mode enables/disables the test modes settable by tst[6:0]. when this bit is set, the following tst[6:0] are enabled. 0: hcan is in normal mode 1: hcan is in test mode 14 tst6 0 r/w write can error counters enables the tec (transmit error counter) and rec (receive error counter) to be writable. the same value is written to tec and rec at the same time. the maximum value that can be written to tec and rec is d'255 (h'ff). this means that the hcan cannot be forced into the bus off state. before writing to tec and rec, the hcan needs to enter halt mode, and when writing to tec and rec, the tst7 bit (mcr15) should be set to 1. the value written to tec is used to write rec. 0: tec/rec is not writable but read-only
rev. 3.0, 09/04, page 543 of 1086 bit bit name initial value r/w description 14 tst6 0 r/w 1: tec/rec is writable with the same value at the same time 13 tst5 0 r/w forced error passive forces the hcan to behave as an error passive node, regardless of the error counters. 0: state of hcan depends on error counters 1: hcan behaves as an error passive node, regardless of error counters 12 tst4 0 r/w automatic acknowledge mode allows the hcan to generate its own acknowledge bit in order to enable the self test. in order to enter self-test mode, the message transmitted needs to be read back, and there are 2 settings for this. one is to set (enable internal loop = 1, disable tx output = 1, and disable rx input = 1), so that the tx value is internally provided to the rx. the other way is to set (enable internal loop = 0, disable tx output = 0, and disable rx input = 0) and connect the tx and rx onto the can bus so that the transmitted data can be received via the can bus. 0: hcan does not generate its own acknowledge bit 1: hcan generates its own acknowledge bit 11 tst3 0 r/w disable error counters enables/disables the error counters (tec/rec). when this bit is disabled, the error counters (tec/rec) remain unchanged and retain the current value. when this bit is enabled, the error counters (tec/rec) operate according to the can specification. 0: error counters (tec/rec) operate according to the can specification 1: error counters (tec/rec) remain unchanged and retain the current value
rev. 3.0, 09/04, page 544 of 1086 bit bit name initial value r/w description 10 tst2 0 r/w disable rx input controls the rx to be supplied to the can interface block. when this bit is enabled, the rx pin value is supplied to the can interface block. when this bit is disabled, the rx value for the can block is always retained or the tx value internally connected if enable internal loop = 1. 0: value of external rx pin is supplied to the can interface block 1: enable internal loop = 0: rx value is retained for the can interface block enable internal loop = 1: tx value is internally supplied to the can interface block 9 tst1 0 r/w disable tx output controls the tx to output transmit data or retain data. when this bit is enabled, the value of the internal transmit output pin appears on the tx pin. when this bit is disabled, the tx pin always retains the value. 0: value of external tx pin is supplied from the can interface block 1: enable internal loop = 0: tx value is retained enable internal loop = 1: tx is supplied to the internal rx 8 tst0 0 r/w enable internal loop enables/disables the internal tx looped back to the internal rx. for details, see section 16.7.1 test mode settings. 0: rx is supplied from the rx pin 1: rx is supplied from the internal tx signal 7 mcr7 0 r/w auto-wake mode enables or disables auto-wake mode. when this bit is set, the hcan automatically cancels sleep mode (mcr5) by detecting can bus activity (dominant bit). when this bit is not set, the hcan does not automatically cancel sleep mode. 0: auto-wake by can bus activity disabled 1: auto-wake by can bus activity enabled 6? 0 rreserved the write value should be 0. the read value is not guaranteed.
rev. 3.0, 09/04, page 545 of 1086 bit bit name initial value r/w description 5 mcr5 0 r/w hcan-ii sleep mode enables or disables sleep mode transition. when this bit is set, sleep mode is enabled. the hcan waits for the completion of the current bus access before entering sleep mode. until this mode is terminated the hcan will ignore can bus operation. the two error counters (rec, tec) will retain the same value during and after sleep mode. this mode will be exited in two ways: ? write 0 to this bit ? if mcr7 is enabled, after detecting a dominant bit on the can bus when exiting this mode, the hcan will synchronize with the can bus (by checking for 11 recessive bits) before restart. this means that, when the second way is used, the hcan cannot receive the first message, however, can transceivers have the same feature, and software needs to be designed in this manner. note: this mode is same as setting the module to halt mode and stopping the clock. this means that, the interrupt is generated from irr0 when entering sleep mode. during sleep mode, only the mpi block is accessible, i.e., mcr/gsr/irr/imr are accessible. however, irr1 cannot be cleared during sleep mode as it is an ored signal of rxpr that cannot be cleared during sleep mode, therefore, it is recommended to set halt mode first and then make a transition to sleep mode. 0: hcan sleep mode is exited 1: transition to hcan sleep mode enabled important: usage of sleep mode is limited. be sure to carefully read section 16.8, usage notes.
rev. 3.0, 09/04, page 546 of 1086 bit bit name initial value r/w description 4 mcr4 0 r/w can endian mode controls whether the hcan should transmit the messages in little endian mode or big endian mode. by using this bit, in other words, it is possible to set different endian mode to the hcan and the external network. note that this bit is only valid when data field is transmitted/received. 0: data field transmitted/received in big endian mode 1: data field transmitted/received in little endian mode 3 mcr3 0 r/w reserved the initial value should be retained. 2 mcr2 0 r/w message transmission priority selects the order of transmission for pending transmit data. when this bit is set, pending transmit data are sent in order of the bit position in the transmit wait register (txpr). the order of transmission starts from mailbox 31 as the highest priority, and then down to mailbox 1 (if those mailboxes are configured for transmission). important: this function cannot be used for timer triggered transmission. when this bit is cleared, all messages for transmission are queued with respect to their priority (by running internal arbitration). the highest priority message has the arbitration field with the lowest digital value and is transmitted first. the internal arbitration includes the rtr bit and the ide bit. 0: transmission order determined by message id priority 1: transmission order determined by mailbox number priority (mailbox 31 mailbox 1)
rev. 3.0, 09/04, page 547 of 1086 bit bit name initial value r/w description 1 mcr1 0 r/w halt request setting this bit causes the can controller to complete its current operation and then to cut off the can bus. the hcan remains in halt mode until this bit is cleared. during halt mode, the can interface does not join the can bus activity or does not store messages nor transmit messages. all of the registers and mailbox contents are retained. the hcan will complete the current operation if it is a transmitter or a receiver, and then enter halt mode. if the can bus is in the idle or intermission state, the hcan will enter halt mode immediately. entering halt mode is notified by irr0 and gsr4. if a halt request is made during bus off, the hcan-ii remains bus off even after 128 11 recessive bits. in order to exit this state, the halt state needs to be canceled by software. in halt mode, the hcan configuration can be modified as it does not join the bus activity. this bit has to be cleared to 0 to re-join the can bus. after this bit is cleared, the can interface waits until it detects 11 recessive bits, and then joins the can bus. 0: normal operating mode 1: halt mode transition request
rev. 3.0, 09/04, page 548 of 1086 bit bit name initial value r/w description 0 mcr0 1 r/w reset request controls resetting of the hcan module. after detecting a reset request, the hcan controller enters its reset routine, re-initializes the internal logic, and then set gsr3 and irr0 to notify reset mode. then the hcan enters reset mode. during re-initialization, all the registers are cleared. this bit has to be cleared by writing a 0 to join the can bus. after this bit is cleared, the hcan needs to be re-configured, waits until it detects 11 recessive bits, and then joins the can bus. after a power-on reset, this bit and gsr3 are always set. this means that a reset request has been made and the hcan is in re-configuration mode. 0: can interface normal operating mode (mcr0 = 0 and gsr3 = 0) setting condition: when 0 is written after an hcan reset 1: reset mode transition request of can interface
rev. 3.0, 09/04, page 549 of 1086 16.4.3 general status register_n (gsr_n) (n = 0, 1) the general status register (gsr) is a 16-bit read-only register that indicates the status of the hcan. bit: 1514131211109876543210 gsr 5 gsr 4 gsr 3 gsr 2 gsr 1 gsr 0 initial value: 0000000000001100 r/w: ?????????? rrrrrr bit bit name initial value r/w description 15 to 6 ? 0 ? reserved the write value should be 0. the read value is not guaranteed. 5 gsr5 0 r error passive status indicates whether the can interface is error passive or not. this bit is set as soon as the hcan enters the error passive state and is cleared when the module enters again the error active state. this means that this bit will remain high during error passive and during bus off. thus to find out the correct state, both gsr5 and grs0 must be considered. 0: hcan is not error passive setting condition: hcan is in error active state 1: hcan is error passive (if gsr0 = 0) setting condition: when tec 128 or rec 128 4 gsr4 0 r halt/sleep status indicates whether the can interface is in the halt/sleep state or not. 0: hcan is not in the halt state nor sleep state 1: halt mode (if mcr1 = 1) or sleep mode (if mcr5 = 1) setting condition: if mcr1 is set and the can bus is either in intermission or idle state
rev. 3.0, 09/04, page 550 of 1086 bit bit name initial value r/w description 3 gsr3 1 r reset status indicates whether the can interface is in the reset state (configuration mode) or not. 0: normal operating state setting condition: after an hcan internal reset 1: reset state (configuration mode) 2 gsr2 1 r message transmission in progress flag indicates to the host cpu if the hcan is processing transmission requests or if a transmission is completed. this bit is an ored signal of all the txpr bits. note that the irr8 (slot empty) is an ored signal of all the txack/aback bits. 0: transmission in progress 1: there is no message requested for transmission 1 gsr1 0 r transmit/receive warning flag indicates an error warning. 0: reset condition: when tec < 96, rec < 96, or tec 256 1: when 96 tec < 256 or 96 rec 0 gsr0 0 r bus off flag indicates that the hcan is in the bus off state. 0: reset condition: recovery from bus off state 1: when tec 256 (bus off state) 16.4.4 hcan-ii_bit timing configuration register n (hcan-ii_bcr0_n, hcan-ii_bcr1_n) (n = 0, 1) the bit configuration registers (bcr0 and bcr1) are 16-bit readable/writable registers that set can bit timing parameters and the baud rate prescaler for the can interface. for the following description the following definition is used: timequanta = brp f clk where: brp (baud rate predivider) is stored in bcr0 and fclk is p (peripheral clock).
rev. 3.0, 09/04, page 551 of 1086 ? bcr1 for details on tseg1 and tseg2 settings, see table 16.4. bit:1514131211109876543210 tseg1[3:0] tseg2[2:0] sjw[1:0] eg bsp initial value:0000000000000000 r/w: r/w r/w r/w r/w ? r/w r/w r/w ?? r/w r/w ?? r/w r/w bit bit name initial value r/w description 15 14 13 12 tseg1[3] tseg1[2] tseg1[1] tseg1[0] 0 0 0 0 r/w r/w r/w r/w time segment 1 (tseg1[3:0] = bcr1[15:12]) set the segment for absorbing output buffer, can bus, and input buffer delay. a value from 4 to 16 time quanta can be set. 0000: setting prohibited 0001: setting prohibited 0010: setting prohibited 0011: prseg + phseg1 = 4 time quanta 0100: prseg + phseg1 = 5 time quanta : 1111: prseg + phseg1 = 16 time quanta 11 ? 0 ? reserved the write value should be 0. the read value is not guaranteed. 10 9 8 tseg2[2] tseg2[1] tseg2[0] 0 0 0 r/w r/w r/w time segment 2 (tseg2[2:0] = bcr1[10:8]) set the segment for correcting 1-bit time error. a value from 2 to 8 time quanta can be set. 000: setting prohibited 001: phseg2 = 2 time quanta (setting prohibited depending on the condition so see table 16.5) 010: phseg2 = 3 time quanta 011: phseg2 = 4 time quanta 100: phseg2 = 5 time quanta 101: phseg2 = 6 time quanta 110: phseg2 = 7 time quanta 111: phseg2 = 8 time quanta 7, 6 ? 0 ? reserved the write value should be 0. the read value is not guaranteed.
rev. 3.0, 09/04, page 552 of 1086 bit bit name initial value r/w description 5 4 sjw[1] sjw[0] 0 0 r/w r/w re-synchronization jump width (sjw[1:0] = bcr0[5:4]) set the synchronization jump width. 00: 1 time quantum 01: 2 time quanta 10: 3 time quanta 11: 4 time quanta 3, 2 ? 0 ? reserved the write value should be 0. the read value is not guaranteed. 1 eg 0 r/w edge select (eg = bcr1[1]) selects at which edge is to be used for re- synchronization. in order to comply with the standard can, 0 should be set. 0: re-synchronization is performed at falling edge of rx 1: re-synchronization is performed at both rising and falling edges of rx 0 bsp 0 r/w bit sample point (bsp = bcr1[0]) sets the point at which data is sampled. important: sampling at three points is only available when the brp[7:0] is programmed to be less than 4. 0: bit sampling at one point (end of time segment 1) 1: bit sampling at three points (end of time segment 1, and 1 time quantum before and after) ? bcr0 bit:1514131211109876543210 brp7brp6brp5brp4brp3brp2brp1brp0 initial value:0000000000000000 r/w: ???????? r/w r/w r/w r/w r/w r/w r/w r/w
rev. 3.0, 09/04, page 553 of 1086 bit bit name initial value r/w description 15 to 8 ? 0 ? reserved the write value should be 0. the read value is not guaranteed. 7 6 5 4 3 2 1 0 brp[7] brp[6] brp[5] brp[4] brp[3] brp[2] brp[1] brp[0] 0 0 0 0 0 0 0 0 r/w r/w r/w r/w r/w r/w r/w r/w baud rate prescale (brp[7:0] = bcr0 [7:0]) set the clock used for 1 time quantum. 00000000: 1 ? p (peripheral clock) 00000001: 2 ? p (peripheral clock) 00000010: 3 ? p (peripheral clock) : (brp + 1) p (peripheral clock) 11111111: 256 p (peripheral clock) about bit configuration register: sync_seg prseg phseg1 phseg2 1-bit time (8-25 quanta) tseg1 tseg2 4-16 2-8 1 quantum sync_seg: segment for establishing synchronization of nodes on the can bus. (normal bit edge transitions occur in this segment.) prseg: segment for adjusting physical delay between networks. phseg1: buffer segment for correcting phase drift (positive). (this segment is extended when synchronization (re-synchronization) is established.) phseg2: buffer segment for correcting phase drift (negative). (this segment is shortened when synchronization (re-synchronization) is established.) the can-bus bit rate is calculate as follows: bit rate = fclk /{(brp[7:0]+1) ( (tseg1[3:0]+1)+(tseg2[2:0]+1)+sync_seg )} the sync_seg is fixed to 1 time quantum. fclk = p (peripheral clock)
rev. 3.0, 09/04, page 554 of 1086 bcr setting constraints tseg1[3:0] + 1 > tseg2[2:0] + 1 sjw[1:0] + 1 tseg1[3:0] + tseg2[2:0] + 3 = 8 to 25 time quantum register set values: tseg1[3:0], tseg2[2:0], and sjw[1:0] these constraints allow the setting range shown in table 16.5 for tseg1 and tseg2 in the bit configuration register. table 16.5 tseg1 and tseg2 settings tseg2 (bcr[10:8]) 001 * 010 011 100 101 110 111 2345678 0011 4 no yes no no no no no 0100 5 yes yes yes no no no no 0101 6 yes yes yes yes no no no 0110 7 yes yes yes yes yes no no 0111 8 yes yes yes yes yes yes no 1000 9 yes yes yes yes yes yes yes 1001 10 yes yes yes yes yes yes yes 1010 11 yes yes yes yes yes yes yes 1011 12 yes yes yes yes yes yes yes 1100 13 yes yes yes yes yes yes yes 1101 14 yes yes yes yes yes yes yes 1110 15 yes yes yes yes yes yes yes tseg1 (bcr[15:12]) 1111 16 yes yes yes yes yes yes yes note: * when brp[7:0] = 0, tseg2[2:0] 2 when brp[7:0] 1, tseg2[2:0] 1 examples: 1. to have a bit rate of 1 mbps with a p (peripheral clock) frequency of fclk = 20 mhz, it is possible to set: brp[7:0] = 1, tseg1[3:0] = 5, and tseg2[2:0] = 2. then bcr1 should be written to h'5200 and bcr0 to h' 0001. 2. to have a bit rate of 500 kbps with a p (peripheral clock) frequency of fclk = 16 mhz, it is possible to set: brp[7:0] = 1, tseg1[3:0] = 9, tseg2[2:0] = 4. then bcr1 should be written to h'9400 and bcr0 to h' 0001. important: when brp[7:0] = h'00, tseg2[2:0] b'001
rev. 3.0, 09/04, page 555 of 1086 16.4.5 interrupt register_n (irr_n) (n = 0, 1) the interrupt register (irr) is a 16-bit readable/writable register that contains status flags for the various interrupt sources. ? irr bit:1514131211109876543210 irr 15 irr 14 irr 13 irr 12 irr 11 irr 10 irr9 irr8 irr7 irr6 irr5 irr4 irr3 irr2 irr1 irr0 initial value:0000000000000001 r/w: r/w r/w r/w r/w r/w r/w r r r/w r/w r/w r/w r/w r r r/w bit bit name initial value r/w description 15 irr15 0 r/w timer compare match interrupt flag 1 indicates that a compare-match condition occurred to the timer compare match register 1 (tcmr1). when the value set in tcmr1 matches the timer value (tcmr1 = tcntr), this bit is set. this bit is not set if the tcmr1 value is h'0000. 0: timer compare match has not occurred to tcmr1 clearing condition: writing 1 1: timer compare match has occurred to tcmr1 setting condition: tcmr1 matches the timer value (tcmr1 = tcntr) if tmr1 = 0 or matches cycle_count + tcntr[15:4] if tmr1 = 1 14 irr14 0 r/w timer compare match interrupt flag 0 indicates that a compare-match condition occurred to the timer compare match register 0 (tcmr0). when the value set in tcmr0 matches the timer value (tcmr0 = tcntr), this bit is set. this bit is not set if the tcmr0 value is h'0000. 0: timer compare match has not occurred to the tcmr0 clearing condition: writing 1 1: timer compare match has occurred to the tcmr0 setting condition: tcmr0 matches the timer value (tcmr0 = tcntr)
rev. 3.0, 09/04, page 556 of 1086 bit bit name initial value r/w description 13 irr13 0 r/w timer overrun interrupt flag indicates that the timer has overrun and is reset to the losr (local offset register) value. this bit is set even when tcmr0 is enabled to clear/set the timer value and its value is set to h'ffff. 0: timer has not overrun clearing condition: writing 1 1: timer has overrun setting condition: when the timer (tcntr) changes from h'ffff to h'0000 12 irr12 0 r/w wake-up on bus activity interrupt flag indicates that a can bus activity is present. while the hcan is in sleep mode and a recessive to dominant bit transition takes place on the can bus, this bit is set. the operation of this interrupt is set in the master control register (mcr7: auto- wake mode). this interrupt is cleared by writing a 1 to this bit. writing a 0 is ignored. 0: bus idle state clearing condition: writing 1 1: can bus activity detected in hcan sleep mode setting condition: recessive dominant bit transition detection while in sleep mode 11 irr11 0 r/w timer compare match interrupt flag 2 indicates that a compare-match condition occurred to the timer compare match register 2 (tcmr2). when the value set in tcmr2 matches the timer value (tcmr2 = tcntr) or matches cycle_count + tcntr[15:4] depending on the tmr2 (timer mode register) setting, this bit is set. this bit is not set if the tcmr2 value is h'0000. 0: timer compare match has not occurred to tcmr2 clearing condition: writing 1 1: timer compare match has occurred to tcmr2 setting condition: tcmr2 matches the timer value (tcmr2 = tcntr) if tmr2 = 0 or matches cycle_count + tcntr[15:4] if tmr2 = 1
rev. 3.0, 09/04, page 557 of 1086 bit bit name initial value r/w description 10 irr10 0 r/w cycle counter overrun interrupt flag indicates that the cycle_counter has reached the maximum value (cmax). when the ccr counter matches the cmax value (ccr = cmax), this bit is set and ccr is cleared. note that setting cmax = 0 disables the cycle_counter and no interrupt is generated. 0: cycle counter has not reached cmax or cmax = 0 clearing condition: writing 1 1: cycle counter has reached cmax and cmax 0 setting condition: ccr matches the cmax value (ccr = cmax) 9 irr9 0 r message overrun/overwrite interrupt flag status flag indicating that new message has been received but the existing message in the mailbox has not been read due to the corresponding rxpr or rfpr set to 1. the received message is either abandoned (overrun) or overwritten dependant upon the nmc (new message control) bit. this bit is cleared by writing 1 to the correspondent bit in umsr (unread message status register). writing 0 is ignored. 0: no message overrun/overwrite clearing condition: clearing of all bits in umsr 1: receive message overrun and its storage has been rejected or message overwrite setting condition: message is received while the corresponding rxpr or rfpr = 1 and mbimr = 0
rev. 3.0, 09/04, page 558 of 1086 bit bit name initial value r/w description 8 irr8 0 r mailbox empty interrupt flag indicates that message transmission or transmission cancellation has been successfully made and this mailbox is now ready to accept a new message data for the next transmission. this bit is set when at least one txpr bit is cleared. this bit is also set by an ored signal of the txack and aback bits, therefore, this bit is automatically cleared when all the txack and aback bits are cleared. writing 0 is ignored. note that this bit does not represent that all txpr bits are reset, whereas gsr2 does. 0: messages set for transmission or transmission cancellation not processed clearing condition: all the txack and aback bits are cleared 1: message has been transmitted or canceled, and new message can be stored setting condition: when one of the txpr bits is cleared by completion of transmission or completion of transmission cancellation, i.e., when a txack or aback bit is set (if mbimr = 0) 7 irr7 0 r/w overload frame interrupt flag indicates that the hcan has transmitted an overload frame. it remains latched until a reset by writing 1 to this bit. writing 0 is ignored. 0: clearing condition: writing 1 1: setting condition: overload frame transmitted
rev. 3.0, 09/04, page 559 of 1086 bit bit name initial value r/w description 6 irr6 0 r/w bus off/bus off recover interrupt flag this bit is set when the hcan enters the bus-off state or when the hcan leaves bus-off and returns to error-active. this is because the existing condition that 11 recessive bits have received 128 times when tec 256 at the node or in the bus-off state. this bit remains latched even when the hcan node cancels the bus-off state, and needs to be cleared by software. gsr0 should be read to determine whether the hcan has become bus-off or error active. this bit is cleared by writing 1 even if the hcan is still in the bus-off state. writing 0 is ignored. 0: clearing condition: writing 1 1: bus off state caused by transmit error or error active state returning from bus-off setting condition: when 11 recessive bits have received 128 times when tec 256 at the node or in the bus-off state 5 irr5 0 r/w error passive interrupt flag indicates that the error passive state caused by the transmit or receive error counter. this bit is cleared by writing 1. writing 0 is ignored. if this bit is cleared, the node may still be error passive. 0: clearing condition: writing 1 1: error passive state caused by transmit/receive error setting condition: when tec 128 or rec 128 4 irr4 0 r/w receive overload warning interrupt flag this bit is set and latched if the receive error counter (rec) reaches a value greater than 96. this bit is cleared by writing 1. writing 0 is ignored. when the interrupt is cleared, rec still holds its value greater than 96. 0: clearing condition: writing 1 1: error warning state caused by receive error setting condition: when rec 96
rev. 3.0, 09/04, page 560 of 1086 bit bit name initial value r/w description 3 irr3 0 r/w transmit overload warning interrupt flag this bit is set and latched if the transmit error counter (tec) reaches a value greater than 96. this bit is cleared by writing 1. writing 0 is ignored. when the interrupt is cleared, tec still holds its value greater than 96. 0: clearing condition: writing 1 1: error warning state caused by transmit error setting condition: when tec 96 2 irr2 0 r remote frame request interrupt flag indicates that a remote frame has been received in a mailbox. this bit is set if at least one receive mailbox contains a remote frame transmission request. this bit is cleared by ensuring all bits in the remote request wait register (rfpr) are cleared. writing to this bit is ignored. 0: clearing condition: clearing of all bits in rfpr 1: at least one remote request is waiting setting condition: when a remote frame is received and the corresponding mbimr = 0 1 irr1 0 r data frame received interrupt flag indicates that there are waiting data frames received. if at least one receive mailbox contains a waiting message, this bit is set. this bit is cleared when all bits in the receive message waiting register (rxpr) are cleared, i.e. there is no waiting message in any receive mailbox. a logical or from each set receive mailbox. writing to this bit is ignored. 0: clearing condition: clearing of all bits in rxpr 1: data frame received and stored in mailbox setting condition: when data is received and the corresponding mbimr = 0
rev. 3.0, 09/04, page 561 of 1086 bit bit name initial value r/w description 0 irr0 1 r/w reset/halt/sleep interrupt flag indicates that the can interface has been reset or halted and the hcan is now in configuration mode or in sleep mode. an interrupt signal will be generated through this bit to notify the change of the hcan's state to the host cpu if an mcr0 (software reset), mcr1 (halt), or mcr5 (sleep) request occurs. gsr can be read after this bit is set to figure out which state the hcan is in. important: when a sleep mode request needs to be made, halt mode should be used beforehand. for details, see the mcr5 description. 0: clearing condition: writing 1 1: transition to software reset mode, transition to halt mode, or transition to sleep mode without halt mode setting condition: when reset/halt processing is completed after an mcr0 (software reset), mcr1 (halt), or mcr5 (sleep) is requested 16.4.6 interrupt mask register_n (imr_n) (n = 0, 1) the interrupt mask register (imr) is a 16-bit register that masks output of corresponding interrupt requests in the interrupt register (irr). an interrupt request is masked if the corresponding bit is set to 1. this register can be read or written to at any time. imr directly controls the generation of an interrupt request, but does not control the setting of the corresponding bit in irr. ? imr bit:1514131211109876543210 imr 15 imr 14 imr 13 imr 12 imr 11 imr 10 imr 9 imr 8 imr 7 imr 6 imr 5 imr 4 imr 3 imr 2 imr 1 imr 0 initial value:1111111111111111 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w
rev. 3.0, 09/04, page 562 of 1086 bit bit name initial value r/w description 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 imr15 imr14 imr13 imr12 imr11 imr10 imr9 imr8 imr7 imr6 imr5 imr4 imr3 imr2 imr1 imr0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w mask the corresponding irr[15:0] interrupts. when this bit is set, the interrupt signal is masked, although the irr setting is retained. 0: corresponding irr is not masked (an interrupt request is generated for interrupt conditions) 1: corresponding irr interrupt is masked 16.4.7 transmit error counter_n (tec_n) (n = 0, 1)/ receive error counter_n (rec_n) (n = 0, 1) the transmit error counter (tec)/receive error counter (rec) is a 16-bit readable/(writable) register that functions as a counter indicating the number of transmit/receive message errors on the can interface. the count value is stipulated in the can protocol specification (references 2 and 3). in normal mode, this register is read-only, and can only be modified by the can interface. this register can be cleared by a reset request (mcr0) or bus off. in test mode (i.e. mcr[15] = mcr[14] = 1), it is possible to write to this register. a same value can only be written to tec and rec, and the value set in tec is written to tec and rec. when writing to this register, the hcan needs to be in halt mode. this function is only intended for test purposes. [important] while the hcan-ii is in the bus-off status, the tec and rec values are undefined.
rev. 3.0, 09/04, page 563 of 1086 ? tec/rec bit: 1514131211109876543210 tec 7 tec 6 tec 5 tec 4 tec 3 tec 2 tec 1 tec 0 rec 7 rec 6 rec 5 rec 4 rec 3 rec 2 rec 1 rec 0 initial value: 0000000000000000 r/w: r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * bit bit name initial value r/w description 15 14 13 12 11 10 9 8 tec7 tec6 tec5 tec4 tec3 tec2 tec1 tec0 0 0 0 0 0 0 0 0 r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * transmit error counter this register is incremented if an error is detected during transmission as specified on the can specification (see can specification document). 7 6 5 4 3 2 1 0 rec7 rec6 rec5 rec4 rec3 rec2 rec1 rec0 0 0 0 0 0 0 0 0 r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * receive error counter this register is incremented if an error is detected during reception as specified on the can specification (see can specification document). note: * it is only possible to write the value in test mode when mcr15 = mcr14 = 1. 16.5 hcan mailbox registers the hcan mailbox registers control individual mailboxes. the address is mapped as follows. note: these registers can only be accessed in word size (16 bits).
rev. 3.0, 09/04, page 564 of 1086 table 16.6 hcan mailbox registers channel address (bytes) register name abbreviation r/w access size (bits) h'd020 transmit pending request register 1_0 txpr1_0 r/w h'd022 transmit pending request register 0_0 txpr0_0 r/w 16 h'd024 h'd026 h'd028 transmit cancel register 1_0 txcr1_0 r/w h'd02a transmit cancel register 0_0 txcr0_0 r/w 16 h'd02c h'd02e h'd030 transmit acknowledge register 1_0 txack1_0 r/w h'd032 transmit acknowledge register 0_0 txack0_0 r/w 16 h'd034 h'd036 h'd038 abort acknowledge register 1_0 aback1_0 r/w h'd03a abort acknowledge register 0_0 aback0_0 r/w 16 h'd03c h'd03e h'd040 data frame receive pending register 1_0 rxpr1_0 r/w h'd042 data frame receive pending register 0_0 rxpr0_0 r/w 16 h'd044 h'd046 h'd048 remote frame receive pending register 1_0 rfpr1_0 r/w h'd04a remote frame receive pending register 0_0 rfpr0_0 r/w 16 h'd04c h'd04e h'd050 mailbox interrupt mask register 1_0 mbimr1_0 r/w h'd052 mailbox interrupt mask register 0_0 mbimr0_0 r/w 16 h'd054 h'd056 h'd058 unread message status register 1_0 umsr1_0 r/w h'd05a unread message status register 0_0 umsr0_0 r/w 16 h'd05c 0 h'd05e
rev. 3.0, 09/04, page 565 of 1086 channel address (bytes) register name abbreviation r/w access size (bits) h'd820 transmit pending request register 1_1 txpr1_1 r/w h'd822 transmit pending request register 0_1 txpr0_1 r/w 16 h'd824 h'd826 h'd828 transmit cancel register 1_1 txcr1_1 r/w h'd82a transmit cancel register 0_1 txcr0_1 r/w 16 h'd82c h'd82e h'd830 transmit acknowledge register 1_1 txack1_1 r/w h'd832 transmit acknowledge register 0_1 txack0_1 r/w 16 h'd834 h'd836 h'd838 abort acknowledge register 1_1 aback1_1 r/w h'd83a abort acknowledge register 0_1 aback0_1 r/w 16 h'd83c h'd83e h'd840 data frame receive pending register 1_1 rxpr1_1 r/w h'd842 data frame receive pending register 0_1 rxpr0_1 r/w 16 h'd844 h'd846 h'd848 remote frame receive pending register 1_1 rfpr1_1 r/w h'd84a remote frame receive pending register 0_1 rfpr0_1 r/w 16 h'd84c h'd84e h'd850 mailbox interrupt mask register 1_1 mbimr1_1 r/w h'd852 mailbox interrupt mask register 0_1 mbimr0_1 r/w 16 h'd854 h'd856 h'd858 unread message status register 1_1 umsr1_1 r/w h'd85a unread message status register 0_1 umsr0_1 r/w 16 h'd85c 1 h'd85e
rev. 3.0, 09/04, page 566 of 1086 16.5.1 transmit pending request register n (txpr0n, txpr1n) (n = 0, 1) txpr1 and txpr0 are 16-bit readable/conditionally-writable registers that contain any transmit wait flags for the can module. txpr1 controls mailbox 31 to mailbox 16, and txpr0 controls mailbox 15 to mailbox 1. the host cpu makes a transmit message stored in a mailbox be in a transmit wait state by writing 1 to the corresponding bit. writing 0 is ignored, and txpr cannot be cleared by writing 0 and must be cleared by setting the corresponding txcr bits. txpr may be read by the host cpu to determine which, if any, transmissions are waiting. there is a transmit wait bit for all mailboxes except for mailbox 0. writing 1 to a bit when the mailbox is set for reception is ignored, and txpr is automatically cleared when an internal arbitration for transmission runs. the hcan will clear a transmit wait flag after successful transmission of its corresponding message or when a transmission wait cancellation is requested successfully from txcr. txpr is not cleared if the message is not transmitted due to the can node losing the arbitration processing or due to errors on the can bus, and the hcan automatically tries to transmit it again unless its dart bit (disable automatic re-transmission) is set in the message control of the corresponding mailbox. in such case (dart set) the transmission wait is cleared and notified through mailbox empty interrupt flag (irr8) and the correspondent bit in the abort acknowledgement register (aback). if the status of txpr changes, the hcan shall ensure that in the id priority scheme (mcr[2] = 0), the highest priority message is always presented for transmission in an intelligent way even under circumstances such as bus arbitration losses or errors on the can bus. for details, see section 16.7, operation. when the hcan changes the state of any txpr bit to 0, a mailbox empty interrupt (irr8) may be generated. this indicates that either a successful or an aborted mailbox transmission has just been made. if a message transmission is successful, it is indicated in txack, and if a message transmission abortion is successful, it is indicated in aback. by checking these registers, the contents of the message data of the corresponding mailbox is modified to prepare for the next transmission. important: if mailbox 31 is used as a transmit buffer, there is a usage limitation. for details, see section 16.8, usage notes.
rev. 3.0, 09/04, page 567 of 1086 ? txpr1n (n = 0, 1) bit: 15 14 13 12 11109876543210 txpr1[15:0] initial value:0000000000000000 r/w: r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * bit bit name initial value r/w description 15 to 0 txpr1[15:0] 0 r/w * request the corresponding mailbox to transmit a can frame. bits 15 to 0 correspond to mailboxes 31 to 16 respectively. when multiple bits are set, the order of the transmissions is determined by mcr2 (can-id or mailbox number). 0: corresponding mailbox is in transmit message idle state clearing condition: completion of message transmission or message transmission wait abortion (automatically cleared) 1: transmission request made for corresponding mailbox note: * only 1 can be written to set a mailbox for transmission.
rev. 3.0, 09/04, page 568 of 1086 ? txpr0n (n = 0, 1) bit:1514131211109876543210 txpr0[15:1] initial value:0000000000000000 r/w: r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r bit bit name initial value r/w description 15 to 1 txpr0[15:1] 0 r/w * request the corresponding mailbox to transmit a can frame. bits 15 to 1 correspond to mailboxes 15 to 1 respectively. when multiple bits are set, the order of the transmissions is determined by mcr2 (can-id or mailbox number). 0: corresponding mailbox is in transmit message idle state clearing condition: completion of message transmission or message transmission wait abortion (automatically cleared) 1: transmission request made for corresponding mailbox 0 ? 0rreserved this bit is always 0 as this is a receive-only mailbox. writing 1 to this bit is ignored. the read value is not guaranteed. note: * only 1 can be written to set a mailbox for transmission.
rev. 3.0, 09/04, page 569 of 1086 16.5.2 transmit cancel register n (txcr1n, txcr0n) (n = 0, 1) txcr1 and txcr0 are 16-bit readable/conditionally-writable registers. txcr1 controls mailbox 31 to mailbox 16, and txcr0 controls mailbox 15 to mailbox 1. this register is used by the host cpu to request the transmission wait messages in txpr to be cancelled. to clear the corresponding bit in txpr, the host cpu must write 1 to the bit in txcr. writing 0 is ignored. when transmission cancellation has succeeded, the can controller clears the corresponding txpr and txcr bits, and sets the corresponding aback bit. however, once a mailbox has started a transmission, it cannot be cancelled by this bit. in such a case, if the transmission finishes in success, the can controller clears the corresponding txpr and txcr bits, and sets the corresponding txack bit, however, if the transmission fails due to a bus arbitration loss or an error on the bus, the can controller clears the corresponding txpr and txcr bits, and sets the corresponding aback bit. if an attempt is made by the host cpu to cancel a mailbox transmission that is not transmit-waiting, it shall have no effect, and will be automatically cleared when an internal arbitration for transmission runs. important: for details on the method of canceling a transmit wait, see section 16.7, operation. important: if mailbox 31 is used as a transmit buffer, there is a usage limitation. for details, see section 16.8, usage notes. ? txcr1n (n = 0, 1) bit:1514131211109876543210 txcr1[15:0] initial value:0000000000000000 r/w: r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * bit bit name initial value r/w description 15 to 0 txcr1[15:0] 0 r/w * request the corresponding mailbox, that is in the queue for transmission, to cancel its transmission wait. bits 15 to 0 correspond to mailboxes 31 to 16 and txpr1[15:0] respectively. 0: corresponding mailbox is in transmit message cancellation idle state clearing condition: completion of transmit wait cancellation (automatically cleared) 1: transmit wait cancellation request made for corresponding mailbox note: * 1 can be written only to a mailbox that is requested for transmission or set for transmission.
rev. 3.0, 09/04, page 570 of 1086 ? txcr0n (n = 0, 1) bit:1514131211109876543210 txcr0[15:1] initial value:0000000000000000 r/w: r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r bit bit name initial value r/w description 15 to 1 txcr0[15:1] 0 r/w * request the corresponding mailbox, that is in the queue for transmission, to cancel its transmission wait. bits 15 to 1 correspond to mailboxes 15 to 1 and txpr0[15:1] respectively. 0: corresponding mailbox is in transmit message cancellation idle state clearing condition: completion of transmit wait cancellation (automatically cleared) 1: transmit wait cancellation request made for corresponding mailbox 0 ? 0rreserved this bit is always 0 as this is a receive-only mailbox. writing 1 to this bit is ignored. the read value is always 0. note: * 1 can be written only to a mailbox that is requested for transmission or set for transmission.
rev. 3.0, 09/04, page 571 of 1086 16.5.3 transmit acknowledge register n (txack1n, txack0n) (n = 0, 1) txack1 and txack0 are 16-bit readable/conditionally-writable registers. these registers notify the host cpu that a mailbox transmission has been successfully made. when a transmission has succeeded, the hcan sets the corresponding bit in txack. the host cpu can clear a txack bit by writing 1 to the corresponding bit. writing 0 is ignored. ? txack1n (n = 0, 1) bit:1514131211109876543210 txack1[15:0] initial value:0000000000000000 r/w: r / wc1 r / wc1 r / wc1 r / wc1 r / wc1 r / wc1 r / wc1 r / wc1 r / wc1 r / wc1 r / wc1 r / wc1 r / wc1 r / wc1 r / wc1 r / wc1 bit bit name initial value r/w description 15 to 0 txack1[15:0] 0 r/wc1 notify that the requested transmission of the corresponding mailbox has been finished successfully. bits 15 to 0 correspond to mailboxes 31 to 16 respectively. 0: clearing condition: writing 1 1: corresponding mailbox has successfully transmitted message (data or remote frame) setting condition: completion of message transmission for corresponding mailbox
rev. 3.0, 09/04, page 572 of 1086 ? txack0n (n = 0, 1) bit:1514131211109876543210 txack0[15:1] initial value:0000000000000000 r/w: r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r bit bit name initial value r/w description 15 to 1 txack0[15:1] 0 r/wc1 notify that the requested transmission of the corresponding mailbox has been finished successfully. bits 15 to 1 correspond to mailboxes 15 to 1 respectively. 0: clearing condition: writing 1 1: corresponding mailbox has successfully transmitted message (data or remote frame) setting condition: completion of message transmission for corresponding mailbox 0 txack0[0] 0 r reserved this bit is always 0 as this is a receive-only mailbox. writing 1 to this bit is ignored. the read value is always 0.
rev. 3.0, 09/04, page 573 of 1086 16.5.4 abort acknowledge register n (aback1n, aback0n) (n = 0, 1) aback1 and aback0 are 16-bit readable/conditionally-writable registers. these registers notify the host cpu that a mailbox transmission has been aborted as per its request. when an abort has succeeded, the hcan sets the corresponding bit in aback. the host cpu can clear the aback bit by writing 1 to the corresponding bit. writing 0 is ignored. an aback bit is used by the hcan to acknowledge that a txpr bit has been cleared by the corresponding txcr bit. ? aback1n (n = 0, 1) bit:1514131211109876543210 aback1[15:0] initial value:0000000000000000 r/w: r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 bit bit name initial value r/w description 15 to 0 aback1[15:0] 0 r/wc1 notify that the requested transmit wait cancellation of the corresponding mailbox has been finished successfully. bits 15 to 0 correspond to mailboxes 31 to 16 respectively. 0: clearing condition: writing 1 1: corresponding mailbox has cancelled transmission of message (data or remote frame) setting condition: completion of transmit wait cancellation for corresponding mailbox
rev. 3.0, 09/04, page 574 of 1086 ? aback0n (n = 0, 1) bit:1514131211109876543210 aback0[15:1] initial value:0000000000000000 r/w: r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r bit bit name initial value r/w description 15 to 1 aback0[15:1] 0 r/wc1 notify that the requested transmit wait cancellation of the corresponding mailbox has been finished successfully. bits 15 to 1 correspond to mailboxes 15 to 1 respectively. 0: clearing condition: writing 1 1: corresponding mailbox has cancelled transmission of message (data or remote frame) setting condition: completion of transmit wait cancellation for corresponding mailbox 00 0 rreserved this bit is always 0 as this is a receive-only mailbox. writing 1 to this bit is ignored. the read value is always 0. 16.5.5 data frame receive pending register n (rxpr1n, rxpr0n) (n = 0, 1) rxpr1 and rxpr0 are 16-bit readable/conditionally-writable registers. rxpr is a register that contains the data frame receive complete flags associated with receive mailboxes. when a can data frame is successfully stored in a receive mailbox, the corresponding bit is set in rxpr. the corresponding bit is cleared by writing 1. writing 0 is ignored. however, the bit may only be set if the mailbox is set by its mbc (mailbox configuration) to receive data frames. when an rxpr bit is set, irr1 (data frame receive interrupt flag) is also set if its mbimr (mailbox interrupt mask register) is not set, and the interrupt signal is generated if imr1 is not set. these bits are only set by receiving data frames and not by receiving remote frames. if a data frame is overwritten/overrun with a remote frame or vice versa, umsr, rxpr, and rfpr will be set for the same mailbox. in this case the application needs to check the rtr bit within the mailbox control field to understand the nature of the message on the mailbox. consequently when umsr is set, both rxpr and rfpr should be checked and, if necessary, cleared.
rev. 3.0, 09/04, page 575 of 1086 ? rxpr1n (n = 0, 1) bit:1514131211109876543210 rxpr1[15:0] initial value:0000000000000000 r/w: r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 bit bit name initial value r/w description 15 to 0 rxpr1[15:0] 0 r/wc1 set receive mailboxes corresponding to mailboxes 31 to 16 respectively. 0: clearing condition: writing 1 1: corresponding mailbox has received a can data frame setting condition: completion of data frame reception in corresponding mailbox ? rxpr0n (n = 0, 1) bit:1514131211109876543210 rxpr0[15:0] initial value:0000000000000000 r/w: r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 bit bit name initial value r/w description 15 to 0 rxpr0[15:0] 0 r/wc1 set receive mailboxes corresponding to mailboxes 15 to 0 respectively. 0: clearing condition: writing 1 1: corresponding mailbox has received a can data frame setting condition: completion of data frame reception in corresponding mailbox
rev. 3.0, 09/04, page 576 of 1086 16.5.6 remote frame receive pending register n (rfpr1n, rfpr0n) (n = 0, 1) rfpr1 and rfpr0 are 16-bit readable/conditionally-writable registers. rfpr is a register that contains the remote request flags associated with the receive mailboxes. when a can remote frame is successfully stored in a receive mailbox, the corresponding bit is set in rfpr. the corresponding bit is cleared by writing 1. writing 0 is ignored. there is a bit for all mailboxes. however, the bit is only set if the mailbox is set by its mbc (mailbox configuration) to receive remote frames. when an rfpr bit is set, irr2 (remote frame request interrupt flag) is also set if its mbimr (mailbox interrupt mask register) is not set, and the interrupt signal is generated if imr2 is not set. these bits are only set by receiving remote frames and not by receiving data frames. if a data frame is overwritten/overrun with a remote frame or vice versa, umsr, rxpr, and rfpr will be set for the same mailbox. in this case the application needs to check the rtr bit within the mailbox control field to understand the nature of the message on the mailbox. consequently when umsr is set, both rxpr and rfpr should be checked and, if necessary, cleared. ? rfpr1n (n = 0, 1) bit:1514131211109876543210 rfpr1[15:0] initial value:0000000000000000 r/w: r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 bit bit name initial value r/w description 15 to 0 rfpr1[15:0] 0 r/wc1 remote request wait flags for receive mailboxes 31 to 16. 0: clearing condition: writing 1 1: corresponding mailbox has received a remote frame setting condition: completion of remote frame reception in corresponding mailbox
rev. 3.0, 09/04, page 577 of 1086 ? rfpr0n (n = 0, 1) bit:1514131211109876543210 rfpr0[15:0] initial value:0000000000000000 r/w: r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 bit bit name initial value r/w description 15 to 0 rfpr0[15:0] 0 r/wc1 remote request wait flags for receive mailboxes 15 to 0. 0: clearing condition: writing 1 1: corresponding mailbox has received a remote frame setting condition: completion of remote frame reception in corresponding mailbox 16.5.7 mailbox interrupt mask register n (mbimr1n, mbimr0n) (n = 0, 1) mbimr1 and mbimr0 are 16-bit readable/writable registers. mbimr only masks irr (irr1: data frame receive interrupt, irr2: remote frame request interrupt, irr8: mailbox empty interrupt, and irr9: message overflow interrupt) related to the mailbox activities. if a mailbox is set for reception, the generation of a receive interrupt (irr1, irr2, and irr9) is masked but the setting of the corresponding bit in rxpr, rfpr, or umsr is not modified. similarly when a mailbox is set for transmission, the generation of an interrupt signal and setting of an mailbox empty interrupt due to successful transmission or abortion of transmission (irr8) are masked, however, clearing the corresponding txpr/txcr bit and setting the txack bit for successful transmission are not masked, or clearing the corresponding txpr/txcr bit and setting the aback bit for abortion of the transmission are not masked. a mask is set by writing 1 to the corresponding bit for the mailbox activity to be masked. at a reset all mailbox interrupts are masked.
rev. 3.0, 09/04, page 578 of 1086 ? mbimr1n (n = 0, 1) bit:1514131211109876543210 mbimr1[15:0] initial value:1111111111111111 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w bit bit name initial value r/w description 15 to 0 mbimr1[15:0] 1 r/w enable or disable interrupts requests from individual mailbox 31 to mailbox 16 respectively. 0: interrupt request from irr1/irr2/irr8/ irr9 enabled 1: interrupt request from irr1/irr2/irr8/ irr9 disabled ? mbimr0n (n = 0, 1) bit:1514131211109876543210 mbimr0[15:0] initial value:1111111111111111 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w bit bit name initial value r/w description 15 to 0 mbimr0[15:0] 1 r/w enable or disable interrupt requests from individual mailbox 15 to mailbox 0 respectively. 0: interrupt request from irr1/irr2/irr8/ irr9 enabled 1: interrupt request from irr1/irr2/irr8/ irr9 disabled
rev. 3.0, 09/04, page 579 of 1086 16.5.8 unread message status register n (umsr1n, umsr0n) (n = 0, 1) umsr1 and umsr0 are 16-bit readable/writable registers that record the receive mailboxes whose contents have not been accessed by the host cpu prior to a new message being received. if the host cpu has not cleared the corresponding bit in rxpr/rfpr when a new message for a mailbox is received, the corresponding umsr bit is set. this bit is cleared by writing 1. writing 0 is ignored. if a mailbox is set for transmission, the corresponding umsr bit cannot be set. ? umsr1n (n = 0, 1) bit:1514131211109876543210 umsr1[15:0] initial value:0000000000000000 r/w: r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 bit bit name initial value r/w description 15 to 0 umsr1[15:0] 0 r/wc1 indicate that an unread message has been overwritten/overrun for mailboxes 31 to 16. 0: clearing condition: writing 1 1: unread message is overwritten by a new message or overrun setting condition: when a new message is received before rxpr/rfpr is cleared.
rev. 3.0, 09/04, page 580 of 1086 ? umsr0n (n = 0, 1) bit:1514131211109876543210 umsr0[15:0] initial value:0000000000000000 r/w: r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 r/ wc1 bit bit name initial value r/w description 15 to 0 umsr0[15:0] 0 r/wc1 indicate that an unread message has been overwritten for mailboxes 15 to 0. 0: clearing condition: writing 1 1: unread message is overwritten by a new message setting condition: when a new message is received before rxpr/rfpr is cleared. 16.6 timer registers the timer is a new function for the hcan-ii. the timer is 16 bits and supports several clock sources. it is divided by a prescale counter to reduce the clock speed. it also supports two input capture registers (icr1 and icr0) and three compare match registers (tcmr2, tcmr1, and tcmr0). the address map is as follows. note: these registers can only be accessed in word size (16 bits).
rev. 3.0, 09/04, page 581 of 1086 table 16.7 hcan timer registers channel address (bytes) register name abbreviation access size (bits) h'd080 timer counter register 0 tcntr0 16 h'd082 timer control register_0 tcr_0 16 h'd084 timer status register_0 tsr_0 16 h'd086 timer drift correction register 0 tdcr0 16 h'd088 local offset register 0 losr0 16 h'd08a input capture register for cycle counter 0 icr0-cc0 16 h'd08c input capture register for timer counter 0 icr0-tm0 16 h'd08e input capture register 1_0 icr1_0 16 h'd090 timer compare match register 0_0 tcmr0_0 16 h'd092 timer compare match register 1_0 tcmr1_0 16 h'd094 timer compare match register 2_0 tcmr2_0 16 h'd096 cycle counter register 0 ccr0 16 h'd098 cycle maximum register 0 cmax0 16 h'd09a timer mode register_0 tmr_0 16 h'd09c cycle counter double buffer 0 ccr_buf0 16 0 h'd09e input capture double buffer 0 icr0_buf0 16 h'd880 timer counter register 1 tcntr1 16 h'd882 timer control register_1 tcr_1 16 h'd884 timer status register_1 tsr_1 16 h'd886 timer drift correction register 1 tdcr1 16 h'd8d8 local offset register 1 losr1 16 h'd88a input capture register for cycle counter 1 icr0-cc1 16 h'd88c input capture register for timer counter 1 icr0-tm1 16 h'd88e input capture register 1_1 icr1_1 16 h'd890 timer compare match register 0_1 tcmr0_1 16 h'd892 timer compare match register 1_1 tcmr1_1 16 h'd894 timer compare match register 2_1 tcmr2_1 16 h'd896 cycle counter register 1 ccr1 16 h'd898 cycle maximum register 1 cmax1 16 h'd89a timer mode register_1 tmr_1 16 h'd89c cycle counter double buffer 1 ccr_buf1 16 1 h'd89e input capture double buffer 1 icr0_buf1 16
rev. 3.0, 09/04, page 582 of 1086 note: it is recommended that the timer should be disabled (tcr15 = 0) to change the setting of the registers related to the timer. 16.6.1 timer counter register n (tcntrn) (n = 0, 1) the timer counter register (tcntr) is a 16-bit readable/writable register that allows the cpu to monitor and modify the value of the free-running timer counter. when the timer matches tcmr0 (timer compare match register 0) and tcr11 is set to 1, tcntr is set to losr (local offset register) and counting starts again. bit:1514131211109876543210 tcntr[15:0] initial value:0000000000000000 r/w: r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * bit bit name initial value r/w description 15 to 0 tcntr[15:0] 0 r/w * indicate the value of the free-running timer. note: * this register is cleared by the compare match condition.
rev. 3.0, 09/04, page 583 of 1086 16.6.2 timer control register_n (tcr_n) (n = 0, 1) the timer control register (tcr) is a 16-bit readable/writable register that controls the operation of the timer. this register should be set before each periodical transmission or the deadline monitor register is set and the timer operation starts. bit:1514131211109876543210 tcr 15 tcr 14 tcr 13 tcr 12 tcr 11 tcr 10 tcr9 tcr7 tpsc 5 tpsc 4 tpsc 3 tpsc 2 tpsc 1 tpsc 0 initial value:0000000000000000 r/w: r/w r/w r/w r/w r/w r/w r/w ? r/w ? r/w r/w ???? bit bit name initial value r/w description 15 tcr15 0 r/w enable timer when this bit is set, the timer runs. when this bit is cleared, the timer completes the current cycle (notified by timer overrun or a compare match condition on tcmr0) and is cleared to 0. 0: timer stops running and is cleared at the end of current cycle 1: timer is running important: there is a failure on the timer function in the sh7058. this bit must be written to 0 not to activate the timer. 14 tcr14 0 r/w disable icr0 enables or disables the input capture register 0 (icr0). when this bit is enabled, the timer value is always captured every time a start of frame (sof) is output to the can bus, whether the hcan is a transmitter or receiver. when this bit is disabled, the value of icr0 remains latched. 0: icr0 is disabled and holds the current value clearing condition:tcr9 = 1 when can-id of receive message is equal to the id of a mailbox with ccm set 1: icr0 is enabled and captures the timer value at every sof
rev. 3.0, 09/04, page 584 of 1086 bit bit name initial value r/w description 13 tcr13 0 r/w timestamp control for reception specifies whether the timestamp in the message control of each mailbox is recorded at the start of frame (sof) or end of frame (eof) when a message is received. this bit selects the trigger for the input capture register 1 (icr1) that is used to timestamp for transmit mailboxes. 0: timestamp is recorded at the sof of every message received 1: timestamp is recorded at the eof of every message received important: the timestamp recorded at the sof of every message received is not supported by the sh7058. when a receive timestamp is used, this bit should be set to 1. 12 tcr12 0 r/w timestamp control for transmission specifies whether the timestamp of each transmit mailbox is recorded at the point that the corresponding txpr bit is set or the corresponding txack bit is set when a transmit request is made. this bit selects the trigger for the input capture register 1 (icr1) that is used for timestamp of receive mailboxes. the input capture register 1 (icr1) is used for timestamp, regardless of whether icr0 is enabled or disabled. 0: timestamp is recorded at the point that the txpr bit is set for message transmission 1: timestamp is recorded at the point that the txack bit is set for message transmission 11 tcr11 0 r/w timer clear/set control by tcmr0 specifies whether the timer is to be cleared and set to losr when tcmr0 matches tcntr. tcmr0 is also capable of generating an interrupt signal to the host cpu via irr15. 0: timer is not cleared by tcmr0 1: timer is cleared by tcmr0
rev. 3.0, 09/04, page 585 of 1086 bit bit name initial value r/w description 10 tcr10 0 r/w timer clear/set control by ccm specifies whether the timer is to be cleared and set to losr by the can-id compare match for receive mailboxes. when a mailbox stores a receive message, the timer counter (tcntr) is automatically cleared and set to losr, if the ccm bit of the corresponding mailbox and this bit are set. ccm is not capable of generating an interrupt signal since this is performed by the message receive interrupt (irr1) or remote frame request interrupt (irr2). 0: timer is not cleared/set by ccm 1: timer is cleared and set to losr by ccm 9 tcr9 0 r/w icr0 automatic disable by ccm specifies whether icr0 is to be disabled by the can-id compare match (ccm) for receive mailboxes. when a mailbox stores a receive message, bit 14 of this register (tcr14) is automatically cleared and the value of icr0 is retained, if the ccm bit of the corresponding mailbox and this bit are set. 0: tcr14 is not cleared by ccm 1: tcr14 is automatically cleared by ccm 8? 0 ? reserved writing 0 to this bit is ignored. the read value is not guaranteed. 7 tcr7 0 r/w drift correction control specifies whether tcntr is to be incremented by 2 or 0 every time tcntr reaches the cycle specified by tdcr. if this function is not required, tdcr must be set to h'0000. 0: timer is incremented by 0 (i.e. retains the same value for one clock cycle) every cycle specified by tdcr. 1: timer is incremented by 2 every cycle specified by tdcr (see tdcr description). 6? 0 ? reserved writing 0 to this bit is ignored. the read value is not guaranteed.
rev. 3.0, 09/04, page 586 of 1086 bit bit name initial value r/w description 5 4 3 2 1 0 tcr5 tcr4 tcr3 tcr2 tcr1 tcr0 0 0 0 0 0 0 r/w r/w ? ? ? ? hcan-ii timer prescaler divide the source clock (2 ? hcan peripheral clock) before it is used for the timer. the following relationship exists between source clocks and the timer 000000: 1 ? source clock 000001: 2 ? source clock 000010: 4 ? source clock 000011: 6 ? source clock 000100: 8 ? source clock : 111111: 126 ? source clock 16.6.3 timer status register_n (tsr_n) (n = 0, 1) the timer status register (tsr) is a 16-bit read-only register that allows the host cpu to monitor the timer compare match status and the timer overrun status. bit:1514131211109876543210 tsr 4 tsr 3 tsr 2 tsr 1 tsr 0 initial value:0000000000000000 r/w: ??????????? rrrrr bit bit name initial value r/w description 15 to 5 ? 0 ? reserved writing 0 to this bit is ignored. the read value is not guaranteed. 4 to 0 tsr[4:0] 0 r these bits are read-only that allow the cpu to monitor the status of the cycle counter, the timer, and the compare match registers. writing to these bits is ignored.
rev. 3.0, 09/04, page 587 of 1086 bit bit name initial value r/w description 4 tsr4 0 r cycle counter overflow flag indicates that the cycle counter has reached its maximum value and is reset to h'0. setting cmax = 0 makes the cycle counter be disabled and tsr4 be always cleared to 0. 0: cycle counter has not overflow clearing condition: writing 1 to irr10 (cycle counter overflow interrupt) 1: cycle counter has overflow setting condition: when the cycle counter value changes from the maximum value (cmax) to h'0 3 tsr3 0 r timer compare match flag 2 indicates that a compare-match condition occurred to the timer compare match register 2 (tcmr2). when the value set in tcmr2 matches the timer value (tcmr2 = tcntr), this bit is set. this bit is not set if the tcmr2 value is h'0000. also, this bit is read-only and is cleared when irr11 (timer compare match interrupt 2) is cleared. 0: timer compare match has not occurred to tcmr2 clearing condition: writing 1 to irr11 (timer compare match interrupt 2) 1: timer compare match has occurred to tcmr2 setting condition: tcmr2 matches the timer value (tcmr2 = tcntr)
rev. 3.0, 09/04, page 588 of 1086 bit bit name initial value r/w description 2tsr20 r timer compare match flag 1 indicates that a compare-match condition occurred to the timer compare match register 1 (tcmr1). when the value set in tcmr1 matches the timer value (tcmr1 = tcntr), this bit is set. this bit is not set if the tcmr1 value is h'0000. also, this bit is read-only and is cleared when irr15 (timer compare match interrupt 1) is cleared. 0: timer compare match has not occurred to tcmr1 clearing condition: writing 1 to irr15 (timer compare match interrupt 1) 1: timer compare match has occurred to tcmr1 setting condition: tcmr1 matches the timer value (tcmr1 = tcntr) 1tsr10 r timer compare match flag 0 indicates that a compare-match condition occurred to the timer compare match register 0 (tcmr0). when the value set in tcmr0 matches the timer value (tcmr0 = tcntr), this bit is set. this bit is not set if the tcmr0 value is h'0000. also, this bit is read-only and is cleared when irr14 (timer compare match interrupt 0) is cleared. 0: timer compare match has not occurred to tcmr0 clearing condition: writing 1 to irr14 (timer compare match interrupt 0) 1: timer compare match has occurred to tcmr0 setting condition: tcmr0 matches the timer value (tcmr0 = tcntr) 0tsr00 r timer overrun flag indicates that the timer has overrun and is reset to h'0000. this bit is set even when tcmr0 is set to h'ffff and is enabled to clear the timer value. 0: timer has not overrun clearing condition: writing 1 to irr13 (timer overrun interrupt) 1: timer has overrun setting condition: when the timer value changes the value from h'ffff to h'0000
rev. 3.0, 09/04, page 589 of 1086 16.6.4 timer mode register_n (tmr_n) (n = 0, 1) the timer mode register (tmr) is a 16-bit readable/writable register that specifies the value to be used for the timer functions. bit:1514131211109876543210 tmr 3 tmr 2 tmr 1 initial value:0000000000000000 r/w: ???????????? r/w r/w r/w ? bit bit name initial value r/w description 15 to 4 ? 0 ? reserved writing 0 to this bit is ignored. the read value is not guaranteed. 3tmr30 r/w timestamp value specifies whether the timestamp for transmission and reception contains the timer value (tcntr) or the value of cycle_counter + tcntr[15:4]. this function is very useful for time triggered transmission. 0: tcntr[15:0] is used for the timestamp 1: cycle_counter + tcntr[15:4] is used for the timestamp 2tmr20 r/w tcmr2 control specifies whether the timer compare match 2 is compared with the timer value (tcntr) or with cycle_counter + tcntr[15:4]. 0: tcntr[15:0] is used for a compare match 1: cycle_counter + tcntr[15:4] is used for a compare match 1tmr10 r/w tcmr1 control specifies whether the timer compare match 1 is compared with the timer value (tcntr) or with cycle_counter + tcntr[15:4]. 0: tcntr[15:0] is used for a compare match 1: cycle_counter + tcntr[15:4] is used for a compare match 0? 0 ? reserved writing 0 to this bit is ignored. the read value is not guaranteed.
rev. 3.0, 09/04, page 590 of 1086 16.6.5 timer drift correction register n (tdcrn) (n = 0, 1) the timer drift correction register (tdcr) is a 16-bit readable/writable register. the purpose of this register is to adjust the drift of the timer caused by a different clock running at other can nodes on the same system. when tcntr reaches to the cycle specified by this register, the timer value is incremented by 2 or 0 (i.e. retains the same value). this register does not point at a specific time nor a specific cycle. this means, if tcntr/2 > tdcr, the drift correction will be performed more than twice (unless tcmr0 is used to clear tcntr before it reaches the second cycle). when tdcr is set to h'0000, the drift correction will not be performed at all. bit:1514131211109876543210 tdcr[15:0] initial value:0000000000000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w bit bit name initial value r/w description 15 to 0 tdcr[15:0] 0 r/w timer drift correction register set the value of the cycle to adjust the drift of the timer. important: for a proper operation of the timer, the maximum value must be tdcr <= 8000 (hexadecimal). 16.6.6 local offset register n (losrn) (n = 0, 1) the local offset register (losr) is a 16-bit readable/writable register that sets a local offset value to tcntr. when tcntr is cleared by an overflow, timer compare match, or can-id compare match, tcntr starts running at the value set in this register. bit:1514131211109876543210 losr[15:0] initial value:0000000000000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w bit bit name initial value r/w description 15 to 0 losr[15:0] 0 r/w local offset register indicate the value of the local offset for tcntr to start with.
rev. 3.0, 09/04, page 591 of 1086 16.6.7 cycle counter register n (ccrn) (n = 0, 1) the cycle counter register (ccr) is a 4-bit readable/writable register that stores the number of the basic cycles for time triggered transmission. its value is incremented by one every time the free- running counter (tcntr) is cleared to 0 by a compare match condition on tcmr0. bit:1514131211109876543210 ccr[3:0] initial value:0000000000000000 r/w:rrrrrrrrrrrrr/wr/wr/wr/w bit bit name initial value r/w description 15 to 4 ? 0 r reserved 3 to 0 ccr[3:0] 0 r/w cycle counter indicate the number of the current basic cycles of the matrix cycle for timer triggered transmission. 16.6.8 cycle counter double-buffer register n (ccr_buf n) (n = 0, 1) the cycle counter double-buffer register (ccr_buf) is a 4-bit readable/writable register that is used when the cycle counter (ccr) and timer counter (tcntr) are read from or written to simultaneously to refer the same basic cycle constantly. (this register is used as a temporary retain register to prevent the 20-bit counter value from being updated in cpu access.) bit:1514131211109876543210 ccr_buf[3:0] initial value:0000000000000000 r/w:rrrrrrrrrrrrr/wr/wr/wr/w bit bit name initial value r/w description 15 to 4 ? 0 r reserved 3 to 0 ccr_buf [3:0] 0 r/w cycle counter double-buffer a temporary retain buffer when accessing the basic cycle of the matrix cycle for timer triggered transmission (ccr) and timer counter (tcntr) simultaneously. the ccr_buf value indicates the same value as write/read data to/from ccr.
rev. 3.0, 09/04, page 592 of 1086 the procedure for accessing the cycle counter (ccr) and timer counter (tcntr) using the cycle counter double-buffer (ccr_buf) is described below. ? read operation read the timer counter (tcntr). (the value of the cycle counter ( ccr) is written to the cycle counter double-buffer (ccr_buf) simultaneously.) then read the cycle counter double-buffer (ccr_buf). ccr- buf ccr tcnt r ccr- buf ccr tcnt r step 1 step 2 peripheral data bus peripheral data bus ? write operation write data to the cycle counter double-buffer (ccr_buf). then write data to the timer counter (tcntr). (the value of the cycle counter double-buffer (ccr_buf) is written to the cycle counter (ccr) simultaneously.) ccr- buf ccr tcnt r ccr- buf ccr tcnt r step 1 step 2 peripheral data bus peripheral data bus
rev. 3.0, 09/04, page 593 of 1086 16.6.9 cycle maximum register n (cmaxn) (n = 0, 1) the cycle maximum register (cmax) is a 4-bit readable/writable register that stores the maximum value for the cycle counter (ccr) for timer triggered transmission to set the number of basic cycles in the matrix system. when the cycle counter reaches the maximum value (ccr = cmax), the cycle counter is cleared to 0 and an interrupt is generated on irr10. bit:1514131211109876543210 cmax[3:0] initial value:0000000000000000 r/w:rrrrrrrrrrrrr/wr/wr/wr/w bit bit name initial value r/w description 15 to 4 ? 0 r reserved 3 to 0 cmax[3:0] 0 r/w cycle maximum value store the maximum value of ccr. the initial value of cmax is 0 making the cycle counter be disabled. during the time trigger setting, the requested value must be programmed. 16.6.10 input capture registers n (icr0_cc n, icr0_buf, icr0_tm n, icr1 n) (n = 0, 1) the input capture registers are composed of one 4-bit readable/writable register (icr0_cc) and two 16-bit readable/writable registers (icr0_tm and icr1). ? icr0_cc n (n = 0, 1) icr0_cc can be used for global synchronization, when used with icr0_tm. the current basic cycle value (cycle_counter) is captured at the sof if icr0_cc is enabled by bit 14 in tcr, regardless whether the receive message matches the id set in the receive mailboxes or not. if icr0_cc is disabled by bit 14 in tcr, it retains the current value. ? icr0_buf n (n = 0, 1): input capture double-buffer register a temporary retain buffer that accesses icr0_cc and icr0_tm simultaneously. the icr0_buf value is same as the icr0_cc value. ? icr0_tm n (n = 0, 1) icr0_tm can be used for global synchronization, when used with icr0_cc. the timer value is captured at the sof if icr0_tm is enabled by bit 14 in tcr, regardless whether the receive message matches the id set in the receive mailboxes or not. if icr0_tm is disabled by bit 14 in tcr, it retains the current value.
rev. 3.0, 09/04, page 594 of 1086 ? read operation for icr0_cc, icr0_buf, and icr0_tm read the input capture register (icr0_tm). (the value of icr0_cc is written to the input capture double-buffer register (icr0_buf) simultaneously.) then read the input capture double-buffer (icr0_buf). icr0-buf icr0_cc icr0_tm icr0-buf icr0_cc icr0_tm step 1 step 2 peripheral data bus peripheral data bus ? write operation for icr0_cc, icr0_buf, and icr0_tm write data to the input capture double-buffer (icr0_buf). then write data to the input capture register (icr0_tm). (the value of the input capture double- buffer (icr0_buf) is written to icr0_cc simultaneously.) icr0-buf icr0_cc icr0_tm icr0-buf icr0_cc icr0_tm step 1 step 2 peripheral data bus peripheral data bus ? icr1 n (n = 0, 1) icr1 records the timestamp for messages to be transmitted and received. bit 13 (for reception) and bit 12 (for transmission) in tcr control at which point the timestamp should be recorded. the difference to icr0 is that icr1 cannot be disabled so that the timestamps recorded on messages are always correct. ? icr0_cc/icr0_buf bit:1514131211109876543210 icr0_cc[3:0]/ icr0_buf[3:0] initial value:0000000000000000 r/w:rrrrrrrrrrrrr/w * r/w * r/w * r/w *
rev. 3.0, 09/04, page 595 of 1086 bit bit name initial value r/w description 15 to 4 ? 0 r reserved the write value should be 0. the read value is not guaranteed. 3 2 1 0 icr0_cc [3:0]/ icr0_buf [3:0] 0 0 0 0 r/w * r/w * r/w * r/w * this register samples the value of the cycle counter register (ccr) at every sof on the can bus when enabled by tcr[14]. note: * this register can be written to, however, the written value is ignored. ? icr0_tm/icr1 bit:1514131211109876543210 icr0_tm[15:0], icr1[15:0] initial value:0000000000000000 r/w: r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * r/w * bit bit name initial value r/w description 15 to 0 icr0_tm[15:0] 0 r/w * this register samples the value of the timer (tcntr) at every sof on the can bus when enabled by tcr[14]. note: * this register can be written to, however, the written value is ignored. bit bit name initial value r/w description 15 to 0 icr1[15:0] 0 r/w * this register samples the value of the timer (tcntr) at the condition specified by bit 13 (for reception) and bit 12 (for transmission) in tcr. note: * this register can be written to, however, the written value is ignored. 16.6.11 timer compare match registers n (tcmr0n, tcmr1n, tcmr2n) (n = 0, 1) ? tcmr0, tcmr1, and tcmr bit:1514131211109876543210 tcmr0[15:0], tcmr1[15:0], tcmr2[15:0] initial value:0000000000000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w
rev. 3.0, 09/04, page 596 of 1086 bit bit name initial value r/w description 15 to 0 tcmr0[15:0] , tcmr1[15:0], tcmr2[15:0] 0 r/w the timer compare match registers (tcmr0, tcmr1, and tcmr2) are 16-bit readable/writable registers that generate interrupt signals, clear/set the timer value (only supported by tcmr0), or clear the transmit messages in the queue (only supported by tcmr2). (these registers offer exactly the same function except for the clear of the timer and the clear of the transmission.) the value used for the compare can be set independently for each register, using bits 1, 2, and 3 in tmr (timer mode register), to be the timer value (tcntr[15:0]) or the value of cycle_count + tcntr[15:4]. interrupts are flagged by bits 15, 14, and 11 in irr when a compare match occurs, and these bits cannot be prevented from being set in irr except when the tcmr value is h'0000. the generation of interrupt signals can be masked by bits 15, 14, and 11 in imr. when a compare match occurs and irr15 (or irr14 or irr11) is set, bits 2, 1, and 3 in tsr (hcan timer status register) are also set. clearing the irr bit also clears the corresponding bit in tsr. the timer value is cleared and losr is set when a compare match occurs to tcmr0 if bit 11 in tcr is enabled (timer clear/set function). tcmr1 and tcmr2 do not have this function. the messages in the transmit queue are cleared only when a compare match occurs to tcmr2 (cancellation of the messages in the transmit queue). tcmr1 and tcmr0 do not have this function. important: tcmr0 and tcmr2 are not supported by the sh7058. the setting must be h'0000.
rev. 3.0, 09/04, page 597 of 1086 16.7 operation 16.7.1 test mode settings the hcan has various test modes. bits tst[7:0] (bits 15 to 8 in mcr) are used to select the hcan-ii test mode. the initial settings allow the hcan to operate in normal mode. the following table is examples for test modes. table 16.8 test modes bit15: tst7 bit14: tst6 bit13: tst5 bit12: tst4 bit11: tst3 bit10: tst2 bit9: tst1 bit8: tst0 description 00000000 normal mode (initial value) 10001010 listen-only mode (receive-only) 10010000 self test mode 1 (external) 10010111 self test mode 2 (internal) 11000000 error passive mode 1 10100000 error passive mode 2 normal mode: the hcan operates normally. listen-only mode: the iso-11898 requires this mode for baud rate detection etc. the error counters are disabled so that tec/rec does not increment the values, and the tx output is disabled so that the hcan does not generate error frames. self test mode 1: the hcan generates its own acknowledge bit. the rx and tx pins must be connected to the can bus. self test mode 2: the hcan generates its own acknowledge bit. the rx and tx pins do not need to be connected to the can bus or any external devices, as the internal tx is looped back to be connected to the internal rx. important: in self test modes 1 and 2, the transmitted data is not received in the internal mailbox. error passive mode 1: the hcan can be forced to become an error passive node by writing a value (greater than 127) to the error counter. (mcr1 must be 1 when writing to the error counter). the value written to tec is used to write to rec, so only the same value can be set to these registers. also, the hcan needs to be in halt mode when writing to tec/rec. error passive mode 2: the hcan can be forced to become an error passive node by setting tst5.
rev. 3.0, 09/04, page 598 of 1086 16.7.2 hcan settings ? reset sequence the following sequence is an example to set the hcan after a software or hardware reset. after a reset, all the registers are initialized, therefore, the hcan needs to be set before joining the can bus activity. please read the notes carefully. reset sequence gsr3 = 0? power-on/software reset * 1 transmission mode clear all mailboxes * 2 (msg-control, data, timestamp, lafm) no yes hcan-ii is in normal mode detect 11 recessive bits and join the can bus activity receive * 3 transmit * 3 normal mode configuration mode clear irr[0] clear required imr bits set lafm mailbox setting (std-id, ext-id, dlc, rtr, ide, mbc, mbimr, atx, nmc, lafm, message data) clear mcr[0] set bit configuration register (bcr) set txpr to start transmission or stay idle to receive notes: 1. a software reset can be performed at any time by setting mcr [0] = 1. 2. mailboxes are comprised of rams, therefore, initialize all the mailboxes first even if some of them are not used. 3. if txpr is not set, the hcan-ii starts the message reception. if txpr is set, the hcan-ii starts transmission of the message and is arbitrated by the can bus. if an arbitration loss occurs, reception starts. figure 16.7 reset sequence
rev. 3.0, 09/04, page 599 of 1086 16.7.3 message transmission sequence (1) event triggered transmission ? message transmission request figure 16.8 is an example to transmit a can frame onto the bus. as described in register description, note that irr8 is set when the txack or aback bit is set. this means that one of the mailboxes has completed its transmission or transmission abortion and is now ready to be updated for the next transmission, whereas, gsr2 means that there is currently no transmission request made (txpr = h'0000). no hcan is in normal mode (mbc[x]=0x000 or 0x001) update message data of mailbox[x] can bus arbitration write 1 to the txpr[x] bit at any desired timing internal arbitration highest priority? transmission start yes can bus end of frame yes no no txack[x] =1? mailbox[x] is ready to be updated for next transmission clear txack[x] irr8 =1? reinterrupt monitoring reinterrupt monitoring figure 16.8 transmission request
rev. 3.0, 09/04, page 600 of 1086 ? internal arbitration for transmission figure 16.9 explains how the hcan manages to schedule transmit-requested messages in the correct order based on the can id. ?internal arbitration? picks up the highest priority message among transmit-requested messages. sof eof interm bus idle sof message tx=arbitation for frame-1 tx=arbitation for frame-3 rx matching 2-1 sof eof interm message tx=arbitation for frame-2 frame-1 frame-2 frame-3 can bus state hcan scheduler state txpr/txcr/ error/arbitation-lost set point interm: intermission field sof: start of frame eof: end of frame message: arbitration + control + data + crc + ack field 1-1 2-2 scheduler start point 3-1 3-2 3-3 rx matching tx=arbitation for frame-4 3-4 figure 16.9 internal arbitration for transmission the hcan scheduler, which runs internal arbitration, has 2 states ? tx arbitration state and rx matching state. the hcan scheduler is in the rx matching state if the can bus is in the eof or intermission cycles, or otherwise is in the tx arbitration state. when a transmit request or transmit abort request is made in the tx arbitration state, the internal arbitration starts running immediately. when a transmit request or transmit abort request is made in the rx matching state, the internal arbitration waits until the rx matching state (i.e. intermission field) is finished, and then starts running as soon as the hcan scheduler state becomes the tx arbitration. there are 5 sources that can run internal arbitration, which are: ? txpr is set ? txcr is set (if txcr is set for the message currently under transmission, the hcan does not stop the transmission but completes. if the message loses the bus arbitration or causes an error on the bus, the hcan will cancel the transmit request.) ? error occurs on the can bus ? message under transmission loses the arbitration on the can bus ? mailbox with the setting mbc = 001 receives a remote frame
rev. 3.0, 09/04, page 601 of 1086 when these sources occur, the internal arbitration starts running to ensure that the highest priority message is always transmitted first. the followings are examples set in figure 16.9. 1-1: when a txpr bit is set while the can bus is idle, the internal arbitration starts running immediately and the transmission is started. 2-1, 2-2: during this period (tx-arbitration for frame-2), when any of the above 5 sources occurs, the internal arbitration starts running and the next frame (frame-2) to be transmitted is scheduled. 3-1, 3-2: during this period (rx matching), any internal arbitration is not allowed to run, but scheduling is performed at the sof of the next frame (frame-2). if the transmit- requested message has the highest priority, the transmission will be set for the frame-3. 3-3, 3-4: this is the same case as 2-1, 2-2. 16.7.4 message transmission cancellation sequence figure 16.10 shows the sequence for canceling a message transmit request set by txpr.
rev. 3.0, 09/04, page 602 of 1086 txpr transmission cancellation sequence transmission of mb[n] in progress? transmission of mb[n] completed set aback[n] * 2 set txack[n] end of txpr transmission cancellation sequence end of txpr transmission cancellation sequence set txcr[n] * 1 read txpr (1) * 1 read txcr (2) * 1 write value of (2) and (not (value of (1)) to txpr * 1 : processing by hardware : setting by user yes no notes: 1. this setting must be made when transmission is canceled regardless of whether the mailbox is transmitting the message or no message is being transmitted. 2. for a message being transmitted, canceling operation of this transmission near eof may also set aback in some case, though txack is normally set. (flag invalid) in this case, clear aback. figure 16.10 transmission cancellation sequence
rev. 3.0, 09/04, page 603 of 1086 16.7.5 message receive sequence figure 16.11 shows the message receive sequence. can bus hcan end of arbitration field end of frame idle valid can-id received compare id with mailbox[n] + lafm[n] (if mbc is set for reception) store mailbox-number[n] and go back to idle state ? store message by overwriting  set umsr  set irr9 (if mbimr[n]=0)  generate interrupt signal (if imr9=0)  reject message  set umsr  set irr9 (if mbimr[n]=0)  generate interrupt signal (if imr9=0)  store message  set rxpr[n] (rfpr[n])  set irr1(irr2) (if mbimr[n]=0)  generate interrupt signal (if imr1(imr2)=0) valid can frame received read irr1(irr2)=0 read rxpr[n] (rfpr[n])=0 write 1 to rxpr[n] (rfpr[n]) read mailbox[n] read rxpr[n] (rfpr[n])=1 reinterrupt monitoring irr1(irr2) =1? read irr rxpr[n] (rfpr[n]) =1? interrupt signal interrupt signal interrupt signal nmc[n] =1? check mbc/ lafm/can-id loop (n=31; n>0; n=n-1) yes: overwrite no: overrun id matched? n=0? n=n-1 no no no no yes incorrect correct yes yes yes yes cpu receive interrupt figure 16.11 message receive sequence when the hcan recognizes the end of the arbitration field during receiving of a message, it starts comparing the received id to the ids set in the mailboxes, starting from mailbox 31 down to mailbox 0. it first checks the mbc if it is configured as a receive box, and reads lafm, and reads the can-id of mailbox 31 to finally compare them to the received id. if it does not match, the same check takes place at mailbox 30 (if configured as a receive box). once the hcan finds a matching id, it stores the number of mailbox n into an internal buffer, stops the search, and goes back to the idle state, waiting for the end of frame (eof) to come. when an eof is notified by the can interface logic, the hcan reads the mbc, lafm, and can-id of mailbox n to confirm the
rev. 3.0, 09/04, page 604 of 1086 matching condition again (i.e., there has been no modification to the configuration of mailbox n). this re-confirmation guarantees the data consistency even when a mailbox is reconfigured during receiving a message. if it still matches, then the message is written to or abandoned, depending on the setting of the nmc bit. if it is written to the corresponding mailbox, including the can-id, i.e., there is a possibility that the can-id is overwritten by a different can-id of the received message due to the lafm used. this also implies that, if the id of a received message matches the id + lafm of 2 or more mailboxes, the higher numbered mailbox will always store the relevant messages and the lower numbered mailbox will never receive messages. therefore, the settings of the ids and lafms need to be carefully made. 16.7.6 reconfiguration of mailboxes when reconfiguration of mailboxes is required, the following procedures should be taken. change id of transmit box or change transmit box to receive box: confirm that the corresponding txpr is not set. the id or corresponding mbc bit can be changed at any time. when both need to be changed, change the id first and then change the corresponding mbc bit. change id of receive box or change receive box to transmit box: method-1: using halt mode the advantage of this method is that the hcan will not lose a message even if the message is on the can bus and the hcan is a receiver. the hcan-ii will be in halt mode after completing the reception. the disadvantage is that it might take long if the hcan is receiving a message (as the transition to halt mode is delayed until the end of the reception), and also the hcan will not be able to receive/transmit messages during halt mode. method-2: without using halt mode the advantage of this method is that the reconfiguration is done immediately, and the software overhead will be less as there is no interrupt. rxpr needs to be read before and after the reconfiguration. this is because to check if a message is received or not during this period. note that mbimr does not prevent the irr1 from being set but simply prevents the interrupt signal from being generated. if a message is received, it is unknown if the received message is for the previous id or for the new id. therefore, if a message is received during this period, it is better to abandon this message, and this is the disadvantage of this method.
rev. 3.0, 09/04, page 605 of 1086 yes yes no no 1 0 reconfiguration of mailboxes set mcr[1] (halt mode) is hcan transmitter, receiver, or bus off? generate interrupt (irr0) read irr0 and gsr4 as 1 change id or mbc of mailbox clear mcr1 method-1 (using halt mode) hcan is in halt hcan is in normal mode hcan is in normal mode set corresponding mbimr read corresponding rxpr(rfpr) bit as 0 change id or mbc of mailbox abandon received message clear corresponding mbimr bit method-2 (without using halt mode) hcan is in normal mode and ready for action hcan is in normal mode read corresponding rxpr(rfpr) bit : processing by hardware : setting by user figure 16.12 change id of receive box or change receive box to transmit box
rev. 3.0, 09/04, page 606 of 1086 16.7.7 list of registers table 16.9 list of registers symbol register name description mcr master control register general configurations for hcan and test mode setting gsr general status register status register for hcan hcan_bcr0/1 bit configuration register timing configurations for baud rate setting irr interrupt register interrupt request status imr interrupt mask register mask for interrupt request txpr0/1 transmit pending request register transmission request txcr0/1 transmit cancel register abort transmission request txack0/1 transmission acknowledge register transmission successful flag aback0/1 abort acknowledge register transmission abort flag rxpr0/1 data frame receive pending register data frame receive flag rfpr0/1 remote frame receive pending register remote frame receive flag mbimr0/1 mailbox interrupt mask register mask for mailbox related interrupt umsr0/1 unread message status register overwrite message flag tcntr timer counter register current timer value tcr timer control register general timer setting tsr timer status register status flag for timer tmr timer mode register value to be used for timestamp and tcmr tdcr timer drift correction register timer adjustment for synchronization with network losr local offset register offset for timer ccr cycle counter register current cycle counter value for time triggered transmission cmax cycle maximum register number of basic cycles icr0/1 input capture register input capture value tcmr0-2 timer compare match register compare value for timer mb mailbox mailbox setting
rev. 3.0, 09/04, page 607 of 1086 16.7.8 interrupt sources table 16.10 lists the hcan-ii interrupt sources. these sources can be masked using the mailbox interrupt mask register (mbimr) and interrupt mask register (imr). for details on the interrupt vector of each interrupt source, see section 7, interrupt controller (intc) . table 16.10 interrupt sources interrupt vector dmac activation hcan0 hcan1 description interrupt flag (irr bit) hcan0 hcan1 error passive interrupt (tec 128 or rec 128) irr5 bus off interrupt (tec 256)/bus off recovery (receives 11 recessive bits 128 times) irr6 error warning interrupt (tec 96) irr3 ers0 ers1 error warning interrupt (rec 96) irr4 reset processing interrupt by power- on reset irr0 overload frame transmission irr7 unread message overwrite/overrun irr9 cycle counter overflow irr10 tcmr2 compare match irr11 detection of can bus operation in hcan-ii sleep mode irr12 timer overrun irr13 tcmr0 compare match irr14 ovr0 ovr1 tcmr1 compare match irr15 not possible data frame reception irr1 rm0 rm1 remote frame reception irr2 possible * sle0 sle1 mailbox empty irr8 not possible not possible note: * mailbox 0 only
rev. 3.0, 09/04, page 608 of 1086 16.7.9 dmac interface the hcan-ii can activate the dmac when a message is received at mailbox 0 in channel 0. when an interrupt occurs by mailbox 0 and the dmac transfer ends after settings of the dmac activation has been made, the rxpr0 and rfpr0 flags are cleared automatically. an interrupt request due to a receive interrupt from the hcan-ii cannot be sent to the cpu in this case. figure 16.13 shows a dmac transfer flowchart. for details on the settings of the dmac activation, see section 10, direct memory access controller(dmac). initial setting of dmac set activation source set source and destination addresses set number of transmissions and interrupts receive a message at mailbox 0 in channel 0 activate dmac dmac transfer ended? enable dmac interrupt clear dmac interrupt flag end interrupt to cpu set dmac transfer end bit clear rxpr and rfpr : processing by hardware : setting by user figure 16.13 dmac transfer flowchart
rev. 3.0, 09/04, page 609 of 1086 16.7.10 hcan-ii port settings the hcan-ii port settings must be made in configuration mode or before entering the mode. for details on port settings, see section 21, pin function controller(pfc). the sh7058 has the hcan-ii with two channels and there are two methods of using the hcan-ii. ? 32-buffer hcan-ii with two channels ? 64-buffer hcan-ii with one channel* note: * when the hcan-ii is used as a 64-buffer with one channel, care is required. be sure to carefully read section 16.8, usage notes. following figures show examples of the 32-buffer hcan-ii with two channels and 64-buffer hcan-ii with one channel. hcan0 (32 buffers) hcan1 (32 buffers) htxd0 pb10 pb11 pl10 pl11 hrxd0 htxd1 hrxd1 figure 16.14 32-buffer hcan-ii with two channels
rev. 3.0, 09/04, page 610 of 1086 hcan0 (32 buffers) hcan1 (32 buffers) htxd0 pl10 pl11 hrxd0 htxd1 hrxd1 figure 16.15 64-buffer hcan-ii with one channel 16.7.11 can bus interface a bus transceiver ic is necessary to connect this lsi to a can bus. a renesas ha13721 transceiver ic and its compatible products are recommended. figure 16.16 shows a sample connection diagram. mode rxd txd nc vcc canh canl gnd hrxd1 nc note: nc: no connection htxd1 this lsi can bus 120 ? ? figure 16.16 high-speed interface using ha13721
rev. 3.0, 09/04, page 611 of 1086 16.8 usage notes 16.8.1 txpr setting during reception when the hcan-ii is used with the baud rate set to 1 mbps and the transmission setting is made during message reception, there are following limitations on the number of transmit mailboxes (mb) and the number of accesses to mailboxes. note that there is no limitation when 500 kbps of baud rate is used. important: limitations on setting txpr during reception there are limitations on the number of mailboxes set by txpr and the number of accesses to mailboxes. table 16.11 limitations on setting txpr during reception p baud rate number of transmit mb to be set simultaneously upper-limit number of accesses to mb in words 25 36 30 30 1.0 mbps 31 29 20 mhz 0.5 mbps 31 no limitation 10 34 20 24 25 18 30 12 1.0 mbps 31 11 16 mhz 0.5 mbps 31 no limitation 16.8.2 transmit cancellation setting immediately after transmission setting in bus idle when the transmission setting is made and then the transmit cancellation (txcr) setting is made while the hcan-ii is in the bus idle state, there are following limitations. important: limitation on transmit cancellation setting immediately after transmission setting in bus idle
rev. 3.0, 09/04, page 612 of 1086 sof bus idele can bus id a t1 t2 transmit cancellation prohibited period when the transmission setting (txpr) is made to a mailbox at the point a shown in the above figure and then transmit cancellation setting (txcr) is made at the timing between t1 and t2, transmission may be performed to the can bus regardless of the fact that a flag is set in the abort acknowledge register. (the transmit acknowledge (txack) of the transmitted mailbox is set.) the t1 and t2 timings are as follows after the transmission setting (txpr) has been made. table 16.12 transmit cancellation prohibited period p baud rate t1 t2 mb order 1.90 s 6.30 s 20 mhz 1 mbps id order 5.05 s 13.55 s mb order 2.55 s 7.65 s 20 mhz 0.5 mbps id order 5.45 s 13.55 s 16.8.3 failure on transmit cancellation at mailbox 31 when mailbox 31 is used as a transmit buffer and the transmit cancellation setting is made by txcr, the following failures may occur. note that these failures do not occur in the bus-off state. ? when the transmit cancellation setting is made by txcr for mailbox 31 during message transmission (except for mailbox 31), a message may be transmitted and the transmit acknowledge register (txack) may be set regardless of the fact that the abort acknowledge register (aback) is set. ? when the transmit cancellation setting is made by txcr for mailbox 31 during message transmission of mailbox 31, txpr may not be cleared even if transmission is completed at mailbox 31 and retransmission may be performed according to the internal arbitration sequence. 16.8.4 txpr setting during transmission when the hcan-ii is used with the baud rate set to 1 mbps and the txpr setting is made during transmission, there are the following limitations on the number of transmit mailboxes (mb) and the number of accesses to mailboxes until transmission is completed. note that there is no limitation when 500 kbps of baud rate is used.
rev. 3.0, 09/04, page 613 of 1086 important: limitations on transmission setting during transmission table 16.13 limitations on accesses during transmission setting number of transmit mb to be set simultaneously upper-limit number of accesses to mb in words 136 234 334 432 532 630 730 828 928 10 26 11 26 12 24 13 24 14 22 15 22 16 22 17 22 18 20 19 20 20 20 21 18 22 18 23 16 24 16 25 14 26 12 27 12 28 10 29 8 30 8
rev. 3.0, 09/04, page 614 of 1086 16.8.5 time triggered transmission setting/timer operation disabled ? the tte (time trigger enable) bit for setting mailboxes must be written to 0. a failure may occur during event triggered transmission. ? the timer must not be operated during event triggered transmission (tcr15 bit = 0). a failure may occur during event triggered transmission. 16.8.6 mailbox access in hcan sleep mode do not access a mailbox in hcan sleep mode. when a mailbox is accessed in hcan sleep mode, cpu operation may be halted. cpu operation is not halted when a register is accessed in hcan sleep mode. accessing a mailbox does not halt cpu operation except for in hcan sleep mode.
rev. 3.0, 09/04, page 615 of 1086 set mcr1 to 1 clear mcr1 to 0 and set mcr5 to 1 stop clk set irr12 to 1 clear mcr5 to 0 yes no yes yes yes no no no yes no gsr4 = 1? bus operating? imr12 = 1? mcr7 = 0? clear mcr5 to 0 sleep mode cancellation user monitor manual cancellation automatic cancellation accesses to mailboxes are prohibited during this period. figure 16.17 hcan sleep mode flowchart
rev. 3.0, 09/04, page 616 of 1086 16.8.7 notes on port settings for 64-buffer hcan-ii with one channel the sh7058 has the hcan-ii with two channels. when using the hcan-ii as a 64-buffer with one channel, the following notice should be taken at port settings. hcan0 (hcan-ii: 32 buffers) hcan1 (hcan-ii: 32 buffers) htxd0 pl10 pl11 hrxd0 htxd1 hrxd1 1. when a message is transmitted to the can bus without connecting to other nodes, an ack error will not occur. for example, when a message is transmitted from hcan0 in the above figure, hcan1 transmits ack in the ack field. hcan1 which already received the message on the can bus transmits ack in the ack field according to the can protocol and hcan0 receives the ack. for a countermeasure, please set the channel that will not transmit the message to the reset state (mcr0 = 1). accordingly, a channel that will not transmit the message does not transmit ack. 2. internal arbitration which determines the transmission order is independently carried out by hcan0 and hcan1, respectively. the hcan-ii has 31 transmission buffers per channel. however, internal arbitration cannot be carried out in the range of the 62 transmission buffers. 3. please do not set the same transmit message id to hcan0 and hcan1. otherwise, the same message will be transmitted from the two channels after arbitration on the can bus.
rev. 3.0, 09/04, page 617 of 1086 section 17 a/d converter 17.1 overview the sh7058 includes a 10-bit successive-approximation a/d converter, with software selection of up to 32 analog input channels. the a/d converter is composed of three independent modules, a/d0, a/d1, and a/d2. a/d0 and a/d1 each comprise three groups, while a/d2 comprises two groups. module analog groups channels analog group 0 an0?an3 analog group 1 an4?an7 a/d0 analog group 2 an8?an11 analog group 3 an12?an15 analog group 4 an16?an19 a/d1 analog group 5 an20?an23 analog group 6 an24?an27 a/d2 analog group 7 an28?an31 17.1.1 features the features of the a/d converter are summarized below. ? 10-bit resolution 32 input channels (a/d0: 12 channels, a/d1: 12 channels, a/d2: 8 channels) ? high-speed conversion conversion time: minimum 13.3 s per channel (when peripheral clock (p ) = 20 mhz) ? two conversion modes ? single mode: a/d conversion on one channel ? scan mode: cotinuous scan mode, single-cycle scan mode (an0?an3, an4?an7, an8? an11, an12?an15, an16?an19, an20?an23, an24?an27, an28?an31) continuous conversion on 1 to 12 channels (a/d0) continuous conversion on 1 to 12 channels (a/d1) continuous conversion on 1 to 8 channels (a/d2) ? thirty-two 10-bit a/d data registers a/d conversion results are transferred for storage into data registers corresponding to the channels.
rev. 3.0, 09/04, page 618 of 1086 ? three sample-and-hold circuits a sample-and-hold circuit is built into each a/d converter module (ad/0, ad/1, and ad/2), simplifying the configuration of external analog input circuitry. ? a/d conversion interrupts and dma function supported an a/d conversion interrupt request (adi) can be sent to the cpu at the end of a/d conversion (adi0: a/d0 interrupt request; adi1: a/d1 interrupt request; adi2: a/d2 interrupt request). also, the dmac can be activated by an adi interrupt request. ? two kinds of conversion activation ? software or external trigger ( adter0 , atu-ii (itvrr2a)) can be selected (a/d0) ? software or external trigger ( adtgr0 , atu-ii (itvrr2b)) can be selected (a/d1) ? software or external trigger ( adtgr1 , atu-ii (itvrr1)) can be selected (a/d2) ? adend output conversion timing can be monitored with the adend output pin when using channel 31 in scan mode. 17.1.2 block diagram figure 17.1 shows a block diagram of the a/d converter.
rev. 3.0, 09/04, page 619 of 1086 a/d0 a/d2 addr0?addr11 adcsr0 adcr0 adtrgr0 an0 an1 an2 an3 an4 an5 an6 an7 an8 an9 an10 an11 av cc av ss av ref addr24? addr31 an24 adend an30 an28 an26 atu0 adcr0, adcr1, adcr2: a/d control registers 0 to 2 adcsr0, adcsr1, adcsr2: a/d control/status registers 0 to 2 addr0 to addr31: a/d data registers 0 to 31 adtrgr0, adtrgr1, adtrgr2: a/d trigger registers 0 to 2 a/d1 addr12?addr23 adcsr1 adcr1 adtrgr1 an12 an13 an14 an15 an16 an17 an18 an19 an20 an21 an22 an23 atu0 adcsr2 adcr2 adtrgr2 an25 an27 an29 an31 atu0 10-bit d/a 10-bit d/a 10-bit d/a successive- approximation register successive- approximation register successive- approximation register module data bus module data bus module data bus analog multiplexer analog multiplexer analog multiplexer bus interface bus interface bus interface internal data bus internal data bus internal data bus adi0 interrupt signal adi1 interrupt signal adi2 interrupt signal sample-and- hold circuit sample-and- hold circuit sample-and- hold circuit a/d conversion control circuit a/d conversion control circuit a/d conversion control circuit comparator comparator comparator + + + ? ? ? figure 17.1 a/d converter block diagram
rev. 3.0, 09/04, page 620 of 1086 17.1.3 pin configuration table 17.1 summarizes the a/d converter?s input pins. there are 32 analog input pins, an0 to an31. the 12 pins an0 to an11 are a/d0 analog inputs, divided into three groups: an0 to an3 (group 0), an4 to an7 (group 1), and an8 to an11 (group 2). the 12 pins an12 to an23 are a/d1 analog inputs, divided into three groups: an12 to an15 (group 3), an16 to an19 (group 4), and an20 to an23 (group 5). the 8 pins an24 to an31 are a/d2 analog inputs, divided into two groups: an24 to an27 (group 6), and an28 to an31 (group 7). the adtrg0 and adtrg1 pins are used to provide a/d conversion start timing from off-chip. when the low level of a pulse is applied to one of these pins, a/d0, a/d1, or a/d2 starts conversion. the adend pin is an output used to monitor conversion timing when channel 31 is used in scan mode. the av cc and av ss pins are power supply voltage pins for the analog section in a/d converter modules a/d0 to a/d2. the av ref pin is the a/d converter module a/d0 to a/d2 reference voltage pin. to maintain chip reliability, ensure that av cc = 5 v 0.5 v and av ss = v ss during normal operation, and never leave the av cc and av ss pins open, even when the a/d converter is not being used. the voltage applied to the analog input pins should be in the range av ss ann av ref .
rev. 3.0, 09/04, page 621 of 1086 table 17.1 a/d converter pins pin name abbreviation i/o function analog power supply pin av cc input a/d0?a/d2 analog section power supply analog ground pin av ss input a/d0?a/d2 analog section ground and reference?voltage analog reference power supply pin av ref input a/d0?a/d2 analog section reference voltage analog input pin 0 an0 input analog input pin 1 an1 input analog input pin 2 an2 input analog input pin 3 an3 input a/d0 analog inputs 0 to 3 (analog group 0) analog input pin 4 an4 input analog input pin 5 an5 input analog input pin 6 an6 input analog input pin 7 an7 input a/d0 analog inputs 4 to 7 (analog group 1) analog input pin 8 an8 input analog input pin 9 an9 input analog input pin 10 an10 input analog input pin 11 an11 input a/d0 analog inputs 8 to 11 (analog group 2) analog input pin 12 an12 input analog input pin 13 an13 input analog input pin 14 an14 input analog input pin 15 an15 input a/d1 analog inputs 12 to 15 (analog group 3) analog input pin 16 an16 input analog input pin 17 an17 input analog input pin 18 an18 input analog input pin 19 an19 input a/d1 analog inputs 16 to 19 (analog group 4) analog input pin 20 an20 input analog input pin 21 an21 input analog input pin 22 an22 input analog input pin 23 an23 input a/d1 analog inputs 20 to 23 (analog group 5)
rev. 3.0, 09/04, page 622 of 1086 table 17.1 a/d converter pins (cont) pin name abbreviation i/o function analog input pin 24 an24 input analog input pin 25 an25 input analog input pin 26 an26 input analog input pin 27 an27 input a/d2 analog inputs 24 to 27 (analog group 6) analog input pin 28 an28 input analog input pin 29 an29 input analog input pin 30 an30 input analog input pin 31 an31 input a/d2 analog inputs 28 to 31 (analog group 7) a/d conversion trigger input pin 0 adtrg0 input a/d0 and a/d1 a/d conversion trigger input a/d conversion trigger input pin 1 adtrg1 input a/d2 a/d conversion trigger input adend output pin adend output a/d2 channel 31 conversion timing monitor output
rev. 3.0, 09/04, page 623 of 1086 17.1.4 register configuration table 17.2 summarizes the a/d converter?s registers. table 17.2 a/d converter registers name abbreviation r/w initial value address access size * 1 a/d data register 0 (h/l) addr0 (h/l) r h'0000 h'fffff800 8, 16 a/d data register 1 (h/l) addr1 (h/l) r h'0000 h'fffff802 8, 16 a/d data register 2 (h/l) addr2 (h/l) r h'0000 h'fffff804 8, 16 a/d data register 3 (h/l) addr3 (h/l) r h'0000 h'fffff806 8, 16 a/d data register 4 (h/l) addr4 (h/l) r h'0000 h'fffff808 8, 16 a/d data register 5 (h/l) addr5 (h/l) r h'0000 h'fffff80a 8, 16 a/d data register 6 (h/l) addr6 (h/l) r h'0000 h'fffff80c 8, 16 a/d data register 7 (h/l) addr7 (h/l) r h'0000 h'fffff80e 8, 16 a/d data register 8 (h/l) addr8 (h/l) r h'0000 h'fffff810 8, 16 a/d data register 9 (h/l) addr9 (h/l) r h'0000 h'fffff812 8, 16 a/d data register 10 (h/l) addr10 (h/l) r h'0000 h'fffff814 8, 16 a/d data register 11 (h/l) addr11 (h/l) r h'0000 h'fffff816 8, 16 a/d data register 12 (h/l) addr12 (h/l) r h'0000 h'fffff820 8, 16 a/d data register 13 (h/l) addr13 (h/l) r h'0000 h'fffff822 8, 16 a/d data register 14 (h/l) addr14 (h/l) r h'0000 h'fffff824 8, 16 a/d data register 15 (h/l) addr15 (h/l) r h'0000 h'fffff826 8, 16 a/d data register 16 (h/l) addr16 (h/l) r h'0000 h'fffff828 8, 16 a/d data register 17 (h/l) addr17 (h/l) r h'0000 h'fffff82a 8, 16 a/d data register 18 (h/l) addr18 (h/l) r h'0000 h'fffff82c 8, 16 a/d data register 19 (h/l) addr19 (h/l) r h'0000 h'fffff82e 8, 16 a/d data register 20 (h/l) addr20 (h/l) r h'0000 h'fffff830 8, 16 a/d data register 21 (h/l) addr21 (h/l) r h'0000 h'fffff832 8, 16 a/d data register 22 (h/l) addr22 (h/l) r h'0000 h'fffff834 8, 16 a/d data register 23 (h/l) addr23 (h/l) r h'0000 h'fffff836 8, 16 a/d data register 24 (h/l) addr24 (h/l) r h'0000 h'fffff840 8, 16 a/d data register 25 (h/l) addr25 (h/l) r h'0000 h'fffff842 8, 16 a/d data register 26 (h/l) addr26 (h/l) r h'0000 h'fffff844 8, 16
rev. 3.0, 09/04, page 624 of 1086 table 17.2 a/d converter registers (cont) name abbreviation r/w initial value address access size * 1 a/d data register 27 (h/l) addr27 (h/l) r h'0000 h'fffff846 8, 16 a/d data register 28 (h/l) addr28 (h/l) r h'0000 h'fffff848 8, 16 a/d data register 29 (h/l) addr29 (h/l) r h'0000 h'fffff84a 8, 16 a/d data register 30 (h/l) addr30 (h/l) r h'0000 h'fffff84c 8, 16 a/d data register 31 (h/l) addr31 (h/l) r h'0000 h'fffff84e 8, 16 a/d control/status register 0 adcsr0 r/(w) * 2 h'00 h'fffff818 8, 16 a/d control register 0 adcr0 r/w h'0f h'fffff819 8, 16 a/d trigger register 0 adtrgr0 r/w h'ff h'fffff76e 8 a/d control/status register 1 adcsr1 r/(w) * 2 h'00 h'fffff838 8, 16 a/d control register 1 adcr1 r/w h'0f h'fffff839 8, 16 a/d trigger register 1 adtrgr1 r/w h'ff h'fffff72e 8 a/d control/status register 2 adcsr2 r/(w) * 2 h'08 h'fffff858 8, 16 a/d control register 2 adcr2 r/w h'0f h'fffff859 8, 16 a/d trigger register 2 adtrgr2 r/w h'ff h'fffff72f 8 notes: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles. 1. a 16-bit access must be made on a word boundary. 2. only 0 can be written to bit 7 to clear the flag.
rev. 3.0, 09/04, page 625 of 1086 17.2 register descriptions 17.2.1 a/d data registers 0 to 31 (addr0 to addr31) a/d data registers 0 to 31 (addr0 to addr31) are 16-bit read-only registers that store the results of a/d conversion. there are 32 registers, corresponding to analog inputs 0 to 31 (an0 to an31). the addr registers are initialized to h'0000 by a power-on reset, and in hardware standby mode and software standby mode. bit: 7 6 5 4 3 2 1 0 addrnh (upper byte) ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r bit: 7 6 5 4 3 2 1 0 addrnl (lower byte) ad1 ad0 ? ? ? ? ? ? initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r (n = 0 to 31) the a/d converter converts analog input to a 10-bit digital value. the upper 8 bits of this data are stored in the upper byte of the addr corresponding to the selected channel, and the lower 2 bits in the lower byte of that addr. only the most significant 2 bits of the addr lower byte data are valid. table 17.3 shows correspondence between the analog input channels and a/d data registers.
rev. 3.0, 09/04, page 626 of 1086 table 17.3 analog input channels and a/d data registers analog input channel a/d data register analog input channel a/d data register analog input channel a/d data register analog input channel a/d data register an0 addr0 an8 addr8 an16 addr16 an24 addr24 an1 addr1 an9 addr9 an17 addr17 an25 addr25 an2 addr2 an10 addr10 an18 addr18 an26 addr26 an3 addr3 an11 addr11 an19 addr19 an27 addr27 an4 addr4 an12 addr12 an20 addr20 an28 addr28 an5 addr5 an13 addr13 an21 addr21 an29 addr29 an6 addr6 an14 addr14 an22 addr22 an30 addr30 an7 addr7 an15 addr15 an23 addr23 an31 addr31 17.2.2 a/d control/status registers 0 and 1 (adcsr0, adcsr1) a/d control/status registers 0 and 1 (adcsr0, adcsr1) are 8-bit readable/writable registers whose functions include selection of the a/d conversion mode for a/d0 and a/d1. adcsr0 and adcsr1 are initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode. bit: 7 6 5 4 3 2 1 0 adf adie adm1 adm0 ch3 ch2 ch1 ch0 initial value: 0 0 0 0 0 0 0 0 r/w: r/(w) * r/w r/w r/w r/w r/w r/w r/w note: * only 0 can be written to clear the flag.
rev. 3.0, 09/04, page 627 of 1086 ? bit 7?a/d end flag (adf): indicates the end of a/d conversion. bit 7: adf description 0 indicates that a/d0 or a/d1 is performing a/d conversion, or is in the idle state (initial value) [clearing conditions] ? when adf is read while set to 1, then 0 is written to adf ? when the dmac is activated by adi0 or adi1 1 indicates that a/d0 or a/d1 has finished a/d conversion, and the digital value has been transferred to addr [setting conditions] ? single mode: when a/d conversion ends ? scan mode: when all set a/d conversions end the operation of the a/d converter after adf is set to 1 differs between single mode and scan mode. in single mode, after the a/d converter transfers the digit value to addr, adf is set to 1 and the a/d converter enters the idle state. in scan mode, adf is set to 1 after all the set conversions end. for example, in the case of 12-channel scanning, adf is set to 1 immediately after the end of conversion for an8 to an11 (group 2) or an20 to an23 (group 5). after adf is set to 1, conversion continues in the case of continuous scanning, and ends in the case of single-cycle scanning. note that 1 cannot be written to adf. ? bit 6?a/d interrupt enable (adie): enables or disables the a/d interrupt (adi). to prevent incorrect operation, ensure that the adst bit in a/d control registers 0 and 1 (adcr0, adcr1) is cleared to 0 before switching the operating mode. bit 6: adie description 0 a/d interrupt (adi0, adi1) is disabled (initial value) 1 a/d interrupt (adi0, adi1) is enabled when a/d conversion ends and the adf bit is set to 1, an a/d0 or a/d1 a/d interrupt (adi0, adi1) will be generated if the adie bit is 1. adi0 and adi1 are cleared by clearing adf or adie to 0.
rev. 3.0, 09/04, page 628 of 1086 ? bits 5 and 4: a/d mode 1 and 0 (adm1, adm0): these bits select the a/d conversion mode from single mode, 4-channel scan mode, 8-channel scan mode, and 12-channel scan mode. to prevent incorrect operation, ensure that the adst bit in a/d control registers 1 and 0 (adcr1, adcr0) is cleared to 0 before switching the operating mode. bit 5: adm1 bit 4: adm0 description 0 single mode (initial value) 0 1 4-channel scan mode (analog groups 0, 1, 2, 3, 4, 5) 0 8-channel scan mode (analog groups 0, 1, 3, 4) 1 1 12-channel scan mode (analog groups 0, 1, 2, 3, 4, 5) when adm1 and adm0 are set to 00, single mode is set. in single mode, operation ends after a/d conversion has been performed once on the analog channels selected with bits ch3 to ch0 in adcsr. when adm1 and adm0 are set to 01, 4-channel scan mode is set. in scan mode, a/d conversion is performed continuously on a number of channels. the channels on which a/d conversion is to be performed in scan mode are set with bits ch3 to ch0 in adcsr1 and adcsr0. in 4-channel scan mode, conversion is performed continuously on the channels in one of analog groups 0 (an0 to an3), 1 (an4 to an7), 2 (an8 to an11), 3 (an12 to an15, 4 (an16 to an19), or 5 (an20 to an23). when the adcs bit is cleared to 0, selecting scanning of all channels within the group (an0 to an3, an4 to an7, an8 to an11, or an12 to an15, an16 to an19, an20 to an23), conversion is performed continuously, once only for each channel within the group, and operation stops on completion of conversion for the last (highest-numbered) channel. when adm1 and adm0 are set to 10, 8-channel scan mode is set. in 8-channel scan mode, conversion is performed continuously on the 8 channels in analog groups 0 (an0 to an3) and 1 (an4 to an7) or analog groups 3 (an12 to an15) and 4 (an16 to an19). when the adcs bit is cleared to 0, selecting scanning of all channels within the groups (an0 to an7 or an12 to an19), conversion is performed continuously, once only for each channel within the groups, and operation stops on completion of conversion for the last (highest-numbered) channel. when adm1 and adm0 are set to 11, 12-channel scan mode is set. in 12-channel scan mode, conversion is performed continuously on the 12 channels in analog groups 0 (an0 to an3), 1 (an4 to an7), and 2 (an8 to an11) or analog groups 3 (an12 to an15), 4 (an16 to an19), and 5 (an20 to an23). when the adcs bit is cleared to 0, selecting scanning of all channels within the groups (an0 to an11 or an12 to an19), conversion is performed continuously, once only for each channel within the groups, and operation stops on completion of conversion for the last (highest-numbered) channel. for details of the operation in single mode and scan mode, see section 17.4, operation.
rev. 3.0, 09/04, page 629 of 1086 ? bits 3 to 0?channel select 3 to 0 (ch3 to ch0): these bits, together with the adm1 and adm0 bits, select the analog input channels. to prevent incorrect operation, ensure that the adst bit in a/d control registers 1 and 0 (adcr1, adcr0) is cleared to 0 before changing the analog input channel selection. analog input channels bit 3: bit 2: bit 1: bit 0: single mode 4-channel scan mode ch3 ch2 ch1 ch0 a/d0 a/d1 a/d0 a/d1 0 an0 (initial value) an12 (initial value) an0 an12 0 1 an1 an13 an0, an1 an12, an13 0 an2 an14 an0?an2 an12?an14 0 1 1 an3 an15 an0?an3 an12?an15 0 an4 an16 an4 an16 0 1 an5 an17 an4, an5 an16, an17 0 an6 an18 an4?an6 an16?an18 0 1 1 1 an7 an19 an4?an7 an16?an19 0 an8 an20 an8 an20 0 1 an9 an21 an8, an9 an20, an21 0 an10 an22 an8?an10 an20?an22 1 0 * 1 1 an11 an23 an8?an11 an20?an23 note: * should be cleared to 0.
rev. 3.0, 09/04, page 630 of 1086 analog input channels bit 3: bit 2: bit 1: bit 0: 8-channel scan mode 12-channel scan mode ch3 ch2 ch1 ch0 a/d0 a/d1 a/d0 a/d1 0 an0, an4 an12, an16 an0, an4, an8 anan12, an16, an20 0 1 an0, an1, an4, an5 an12, an13, an16, an17 an0, an1, an4, an5, an8, an9 an12, an13, an16, an17, an20, an21 0 an0?an2, an4?an6 an12?an14, an16?an18 an0?an2, an4?an6, an8?an10 an12?an14, an16?an18, an20?an22 0 1 1 an0?an7 an12?an19 an0?an11 an12?an23 0 an0, an4 an12, an16 an0, an4, an8 an12, an16, an20 0 1 an0, an1, an4, an5 an12, an13, an16, an17 an0, an1, an4, an5, an8, an9 an12, an13, an16, an17, an20, an21 0 an0?an2, an4?an6 an12?an14, an16?an18 an0?an2, an4?an6, an8?an10 an12?an14, an16?an18, an20?an22 0 1 1 1 an0?an7 an12?an19 an0?an11 an12?an23 0 an0, an4, an8 an12, an16, an20 0 1 an0, an1, an4, an5, an8, an9 an12, an13, an16, an17, an20, an21 0 an0?an2, an4?an6, an8?an10 an12?an14, an16?an18, an20?an22 1 0 * 1 1 1 reserved * 2 reserved * 2 an0?an11 an12?an23 notes: 1. should be cleared to 0. 2. these modes are provided for future expansion, and cannot be used at present.
rev. 3.0, 09/04, page 631 of 1086 17.2.3 a/d control registers 0 to 2 (adcr0 to adcr2) a/d control registers 0 to 2 (adcr0 to adcr2) are 8-bit readable/writable registers that control the start of a/d conversion and selects the operating clock for a/d0 to a/d2. adcr0 to adcr2 are initialized to h'0f by a power-on reset, and in hardware standby mode and software standby mode. bits 3 to 0 of adcr0 to adcr2 are reserved. these bits cannot be modified. these bits are always read as 1. bit: 7 6 5 4 3 2 1 0 trge cks adst adcs ? ? ? ? initial value: 0 0 0 0 1 1 1 1 r/w: r/w r/w r/w r/w r r r r ? bit 7?trigger enable (trge): enables or disables triggering of a/d conversion by external input or the atu-ii. bit 7: trge description 0 a/d conversion triggering by external input or atu-ii is disabled (initial value) 1 a/d conversion triggering by external input or atu-ii is enabled for details of external or atu-ii trigger selection, see section 17.2.5, a/d trigger registers 0 to 2 (adtrgr0 to adtrgr2). when atu triggering is selected, clear bit 7 of registers adtrgr0 to adtrgr2 to 0. when external triggering is selected, upon input of the low level of a pulse to the adtrg0 or adtrg1 pin after trge has been set to 1, the a/d converter detects the falling edge of a pulse and sets the adst bit to 1 in adcr. the same operation is subsequently performed when 1 is written in the adst bit by software. external triggering of a/d conversion is only enabled when the adst bit is cleared to 0. when external triggering is used, the low level input to the adtrg0 or adtrg1 pin must be at least 1.5 p clock cycles in width. for details, see section 17.4.4, external triggering of a/d conversion.
rev. 3.0, 09/04, page 632 of 1086 ? bit 6?clock select (cks): selects the a/d conversion time. a/d conversion is executed in a maximum of 266 states when cks is 0, and a maximum of 134 states when 1. to prevent incorrect operation, ensure that the adst bit a/d control registers 0 to 2 (adcr0 to adcr2) is cleared to 0 before changing the a/d conversion time. for details, see section 17.4.3, analog input sampling and a/d conversion time. bit 6: cks description 0 conversion time = 266 states (maximum) (initial value) 1 conversion time = 134 states (maximum) ? bit 5?a/d start (adst): starts or stops a/d conversion. a/d conversion is started when adst is set to 1, and stopped when adst is cleared to 0. bit 5: adst description 0 a/d conversion is stopped (initial value) 1 a/d conversion is being executed [clearing conditions] ? single mode: automatically cleared to 0 when a/d conversion ends ? scan mode: automatically cleared to 0 on completion of one round of conversion on all set channels (single-cycle scan) note that the operation of the adst bit differs between single mode and scan mode. in single mode, adst is automatically cleared to 0 when a/d conversion ends on one channel. in scan mode (continuous scan), when all conversions have ended for the selected analog inputs, adst remains set to 1 in order to start a/d conversion again for all the channels. therefore, in scan mode (continuous scan), the adst bit must be cleared to 0, stopping a/d conversion, before changing the conversion time or the analog input channel selection. however, in scan mode (single-cycle scan), the adst bit is automatically cleared to 0, stopping a/d conversion, when one round of conversion ends on all the set channels. ensure that the adst bit in adcr0 to adcr2 is cleared to 0 before switching the operating mode. also, make sure that a/d conversion is stopped (adst is cleared to 0) before changing a/d interrupt enabling (bit adie in adcsr0 to adcsr2), the a/d conversion time (bit cks in adcr0 to adcr2), the operating mode (bits adm1 and adm0 in adscr0 to adcsr2), or the analog input channel selection (bits ch3 to ch0 in adcsr0 to adcsr2). the a/d data register contents will not be guaranteed if these changes are made while the a/d converter is operating (adst is set to 1).
rev. 3.0, 09/04, page 633 of 1086 ? bit 4?a/d continuous scan (adcs): selects either single-cycle scan or continuous scan in scan mode. this bit is valid only when scan mode is selected. see section 17.4.2, scan mode, for details. bit 4: adcs description 0 single-cycle scan (initial value) 1 continuous scan ? bits 3 to 0?reserved: these bits are always read as 1. the write value should always be 1. 17.2.4 a/d control/status register 2 (adcsr2) a/d control/status register 2 (adcsr2) is an 8-bit readable/writable register whose functions include selection of the a/d conversion mode for a/d2. adcsr2 is initialized to h'08 by a power-on reset, and in hardware standby mode and software standby mode. bit: 7 6 5 4 3 2 1 0 adf adie adm1 adm0 ? ch2 ch1 ch0 initial value: 0 0 0 0 1 0 0 0 r/w: r/(w) * r/w r/w r/w r r/w r/w r/w note: * only 0 can be written to clear the flag. ? bit 7?a/d end flag (adf): indicates the end of a/d conversion. bit 7: adf description 0 indicates that a/d2 is performing a/d conversion, or is in the idle state (initial value) [clearing conditions] ? when adf is read while set to 1, then 0 is written to adf ? when the dmac is activated by adi2 1 indicates that a/d2 has finished a/d conversion, and the digital value has been transferred to addr [setting conditions] ? single mode: when a/d conversion ends ? scan mode: when all set a/d conversions end
rev. 3.0, 09/04, page 634 of 1086 the operation of the a/d converter after adf is set to 1 differs between single mode and scan mode. in single mode, after the a/d converter transfers the digit value to addr, adf is set to 1 and the a/d converter enters the idle state. in scan mode, adf is set to 1 after all the set conversions end. for example, in the case of 8-channel scanning, adf is set to 1 immediately after the end of conversion for an28 to an31 (group 7). after adf is set to 1, conversion continues in the case of continuous scanning, and ends in the case of single-cycle scanning. note that 1 cannot be written to adf. ? bit 6?a/d interrupt enable (adie): enables or disables the a/d interrupt (adi). to prevent incorrect operation, ensure that the adst bit in a/d control register 2 (adcr2) is cleared to 0 before switching the operating mode. bit 6: adie description 0 a/d interrupt (adi2) is disabled (initial value) 1 a/d interrupt (adi2) is enabled when a/d conversion ends and the adf bit in adcsr2 is set to 1, an a/d2 a/d interrupt (adi2) will be generated if the adie bit is 1. adi2 is cleared by clearing adf or adie to 0. ? bits 5 and 4?a/d mode 1 and 0 (adm1, adm0): these bits select the a/d conversion mode from single mode, 4-channel scan mode,and 8-channel scan mode. to prevent incorrect operation, ensure that the adst bit in a/d control register 2 (adcr2) is cleared to 0 before switching the operating mode. bit 5: adm1 bit 4: adm0 description 0 single mode (initial value) 0 1 4-channel scan mode (analog groups 6 and 7) 0 8-channel scan mode (analog groups 6 and 7) 1 1 reserved when adm1 and adm0 are set to 00, single mode is set. in single mode, operation ends after a/d conversion has been performed once on the analog channels selected with bits ch2 to ch0 in adcsr. when adm1 and adm0 are set to 01, 4-channel scan mode is set. in scan mode, a/d conversion is performed continuously on a number of channels. the channels on which a/d conversion is to be performed in scan mode are set with bits ch2 to ch0 in adcsr2. in 4- channel scan mode, conversion is performed continuously on the channels in one of analog groups 6 (an24 to an27) or 7 (an28 to an31).
rev. 3.0, 09/04, page 635 of 1086 when the adcs bit is cleared to 0, selecting scanning of all channels within the group (an24 to an27, an28 to an31), conversion is performed continuously, once only for each channel within the group, and operation stops on completion of conversion for the last (highest- numbered) channel. when adm1 and adm0 are set to 10, 8-channel scan mode is set. in 8-channel scan mode, conversion is performed continuously on the 8 channels in analog groups 6 (an24 to an27) and 7 (an28 to an31). when the adcs bit is cleared to 0, selecting scanning of all channels within the groups (an24 to an31), conversion is performed continuously, once only for each channel within the groups, and operation stops on completion of conversion for the last (highest-numbered) channel. for details of the operation in single mode and scan mode, see section 17.4, operation. ? bit 3?reserved: this bit is always read as 1. the write value should always be 0. ? bits 2 to 0?channel select 2 to 0 (ch2 to ch0): these bits, together with the adm1 and adm0 bits, select the analog input channels. to prevent incorrect operation, ensure that the adst bit in a/d control register 2 (adcr2) is cleared to 0 before changing the analog input channel selection. analog input channels bit: ch2 bit: ch1 bit: ch0 single mode 4-channel scan mode 8-channel scan mode 0 an24 (initial value) an24 an24, an28 0 1 an25 an24, an25 an24, an25, an28, an29 0 an26 an24?an26 an24?an26, an28?an30 0 1 1 an27 an24?an27 an24?an31 0 an28 an28 an24, an28 0 1 an29 an28, an29 an24, an25, an28, an29 0 an30 an28?an30 an24?an26, an28?an30 1 1 1 an31 an28?an31 an24?an31
rev. 3.0, 09/04, page 636 of 1086 17.2.5 a/d trigger registers 0 to 2 (adtrgr0 to adtrgr2) the a/d trigger registers (adtrgr0 to adtrgr2) are 8-bit readable/writable registers that select the a/d0, a/d1, and a/d2 triggers. either external pin ( adtrg0 , adtrg1 ) or atu-ii (atu-ii interval timer a/d conversion request) triggering can be selected. adtrgr0 to adtrgr2 are initialized to h'ff by a power-on reset, and in hardware standby mode and software standby mode. bit: 7 6 5 4 3 2 1 0 extrg ? ? ? ? ? ? ? initial value: 1 1 1 1 1 1 1 1 r/w: r/w r r r r r r r ? bit 7?trigger enable (extrg): selects external pin input ( adtrg0 , adtrg1 ) or the atu-ii interval timer a/d conversion request. bit 7: extrg description 0 a/d conversion is triggered by the atu-ii channel 0 interval timer a/d conversion request 1 a/d conversion is triggered by external pin input ( adtrg ) (initial value) in order to select external triggering or atu-ii triggering, the tgre bit in adcr0 to adcr2 must be set to 1. for details, see section 17.2.3, a/d control registers 0 to 2 (adcr0 to adcr2). ? bits 6 to 0?reserved: these bits are always read as 1. the write value should always be 1.
rev. 3.0, 09/04, page 637 of 1086 17.3 cpu interface a/d data registers 0 to 31 (addr0 to addr31) are 16-bit registers, but they are connected to the cpu by an 8-bit data bus. therefore, the upper and lower bytes must be read separately. to prevent the data being changed between the reads of the upper and lower bytes of an a/d data register, the lower byte is read via a temporary register (temp). the upper byte can be read directly. data is read from an a/d data register as follows. when the upper byte is read, the upper-byte value is transferred directly to the cpu and the lower-byte value is transferred into temp. next, when the lower byte is read, the temp contents are transferred to the cpu. when performing byte-size reads on an a/d data register, always read the upper byte before the lower byte. it is possible to read only the upper byte, but if only the lower byte is read, incorrect data may be obtained. if a word-size read is performed on an a/d data register, reading is performed in upper byte, lower byte order automatically. figure 17.2 shows the data flow for access to an a/d data register. cpu (h'aa) temp (h'40) addrnl (h'40) addrnh (h'aa) module data bus upper-byte read cpu (h'40) temp (h'40) addrnl (h'40) addrnh (h'aa) bus interface module data bus lower-byte read bus interface figure 17.2 a/d data register access operation (reading h'aa40)
rev. 3.0, 09/04, page 638 of 1086 17.4 operation the a/d converter operates by successive approximations with 10-bit resolution. it has two operating modes: single mode and scan mode. there are two kinds of scan mode: continuous and single-cycle. in single mode, conversion is performed once on one specified channel, then ends. in continuous scan mode, a/d conversion continues on one or more specified channels until the adst bit is cleared to 0. in single-cycle scan mode, a/d conversion ends after being performed once on one or more channels. 17.4.1 single mode single mode, should be selected when only one a/d conversion on one channel is required. single mode is selected by setting the adm1 and adm0 bits in the a/d control/status register (adscr) to 00. when the adst bit in the a/d control register (adcr) is set to 1, a/d conversion is started in single mode. the adst bit remains set to 1 during a/d conversion, and is automatically cleared to 0 when conversion ends. when conversion ends, the adf flag in adcsr is set to 1. if the adie bit in adcsr is also 1, an adi interrupt is requested. to clear the adf flag, first read adf when set to 1, then write 0 to adf. if the dmac is activated by the adi interrupt, adf is cleared automatically. an example of the operation when analog input channel 1 (an1) is selected and a/d conversion is performed in single mode is described next. figure 17.3 shows a timing diagram for this example. 1. single mode is selected (adm1 = adm0 = 0), input channel an1 is selected (ch3 = ch2 = ch1 = 0, ch0 = 1), the a/d interrupt is enabled (adie = 1), and a/d conversion is started (adst = 1). 2. when a/d conversion is completed, the result is transferred to addr1. at the same time the adf flag is set to 1, the adst bit is cleared to 0, and the a/d converter becomes idle. 3. since adf = 1 and adie = 1, an adi interrupt is requested. 4. the a/d interrupt handling routine is started. 5. the routine reads adf set to 1, then writes 0 to adf. 6. the routine reads and processes the conversion result (addr1). 7. execution of the a/d interrupt handling routine ends. after this, if the adst bit is set to 1, a/d conversion starts again and steps 2 to 7 are repeated.
rev. 3.0, 09/04, page 639 of 1086 idle set * set * a/d conver- sion starts set * clear * clear * idle idle idle a/d con- version (1) idle idle read conversion result read conversion result a/d conversion result (1) a/d conversion result (2) state of channel 0 (an0) adf adst adie state of channel 1 (an1) state of channel 2 (an2) state of channel 3 (an3) addr0 addr1 addr2 addr3 note: * vertical arrows ( ) indicate instructions executed by software. a/d con- version (2) figure 17.3 example of a/d converter operation (single mode, channel 1 selected)
rev. 3.0, 09/04, page 640 of 1086 17.4.2 scan mode scan mode is useful for monitoring analog inputs in a group of one or more channels. scan mode is selected for a/d0 or a/d1 by setting the adm1 and adm0 bits in a/d control/status register 0 or 1 (adscr0 or adscr1) to 01 (4-channel scan mode), 10 (8-channel scan mode), or 11 (12- channel scan mode). for a/d2, scan mode is selected by setting the adm1 and adm0 bits in a/d control/status register 2 (adcsr2) to 01 (4-channel scan mode) or 10 (8-channel scan mode). when the adcs bit is cleared to 0 and the adst bit is set to 1 in the a/d control register (adcr), single-cycle scanning is performed. when the adcs bit is set to 1 and the adst bit is set to 1, continuous scanning is performed. in scan mode, a/d conversion is performed in low-to-high analog input channel number order (an0, an1 ... an11, an12, an13 ... an23, an24, an25 ... an31). in single-cycle scanning, the adf bit in adcsr is set to 1 when conversion has been performed once on all the set channels, and the adst bit is automatically cleared to 0. in continuous scanning, the adf bit in adcsr is set to 1 when conversion ends on all the set channels. to stop a/d conversion, write 0 to the adst bit. if the adie bit in adcsr is set to 1 when adf is set to 1, an adi interrupt (adi0, adi1, or adi2) is requested. to clear the adf flag, first read adf when set to 1, then write 0 to adf. if the dmac is activated by the adi interrupt, adf is cleared to 0 automatically. an example of the operation when analog inputs 0 to 11 (an0 to an11) are selected and a/d conversion is performed in single-cycle scan mode is described below. figure 17.4 shows the operation timing for this example. 1. 12-channel scan mode is selected (adm1 = 1, adm0 = 1), single-cycle scan mode is selected (adcs = 0), analog input channels an0 to an11 are selected (ch3 = 0, ch2 = 0, ch1 = 1, ch0 = 1), and a/d conversion is started. 2. when conversion of the first channel (an0) is completed, the result is transferred to addr0. next, conversion of the second channel (an1) starts automatically. 3. conversion proceeds in the same way through the 12th channel (an11). 4. when conversion is completed for all the selected channels (an0 to an11), the adf flag is set to 1, the adst bit is cleared to 0 automatically, and a/d conversion stops. if the adie bit is 1, an adi interrupt is requested after a/d conversion ends.
rev. 3.0, 09/04, page 641 of 1086 an example of the operation when analog inputs 0 to 2 and 4 to 6 (an0 to an2 and an4 to an6) are selected and a/d conversion is performed in 8-channel scan mode is described below. figure 17.5 shows the operation timing. 1. 8-channel scan mode is selected (adm1 = 1, adm0 = 0) continuous scan mode is selected (adcs = 1), analog input channels an0 to an2 and an4 to an6 are selected (ch3 = 0, ch2 = 0, ch1 = 1, ch0 = 0), and a/d conversion is started. 2. when conversion of the first channel (an0) is completed, the result is transferred to addr0. next, conversion of the second channel (an1) starts automatically. 3. conversion proceeds in the same way through the third channel (an2). 4. conversion of the fifth channel (an4) starts automatically. 5. conversion proceeds in the same way through the seventh channel (an6) 6. when conversion is completed for all the selected channels (an0 to an2 and an4 to an6), the adf flag is set to 1. if the adie bit is also 1, an adi interrupt is requested. 7. steps 2 to 6 are repeated as long as the adst bit remains set to 1. when the adst bit is cleared to 0, a/d conversion stops. after this, if the adst bit is set to 1, a/d conversion starts again from the first channel (an0).
rev. 3.0, 09/04, page 642 of 1086 adst adf addr0 addo1 addr2 addr9 addr10 addr11 state of channel 0 (an0) state of channel 1 (an1) state of channel 2 (an2) state of channel 9 (an9) state of channel 10 (an10) state of channel 11 (an11) idle idle continuous a/d conversion set * clear clear * idle idle idle idle a/d conver- sion (1) a/d conver- sion (2) a/d conver- sion (3) a/d conver- sion (9) a/d conver- sion (10) a/d conver- sion (11) idle idle idle idle idle idle a/d conversion result (0) a/d conversion result (1) a/d conversion result (2) a/d conversion result (9) a/d conversion result (10) a/d conversion result (11) note: * vertical arrows ( ) indicate instructions executed by software. figure 17.4 example of a/d converter operation (scan mode (single-cycle scan), channels an0 to an11 selected)
rev. 3.0, 09/04, page 643 of 1086 continuous a/d conversion set * 1 adst adf addr0 addr1 addr2 addr3 addr4 addr5 addr6 addr7 clear * 1 clear * 1 * 2 state of channel 0 (an0) state of channel 1 (an1) state of channel 2 (an2) state of channel 3 (an3) state of channel 4 (an4) state of channel 5 (an5) state of channel 6 (an6) state of channel 7 (an7) idle idle idle idle idle idle idle idle idle idle idle idle idle idle idle idle idle a/d conversion result (10) a/d conversion result (6) notes: * 1 vertical arrows ( ) indicate instructions executed by software. * 2 data currently being converted is ignored. a/d conversion result (5) a/d conver- sion (1) a/d conver- sion (2) a/d conver- sion (3) a/d conver- sion (7) a/d conver- sion (8) a/d conver- sion (9) idle a/d conver- sion (10) a/d conver- sion (11) idle a/d conver- sion (5) a/d conver- sion (6) a/d conver- sion (4) a/d conversion result (7) a/d conversion result (8) a/d conversion result (9) a/d conversion result (3) a/d conversion result (2) a/d conversion result (1) a/d conversion result (4) figure 17.5 example of a/d converter operation (scan mode (continuous scan), channels an0 to an2 and an4 to an6 selected)
rev. 3.0, 09/04, page 644 of 1086 17.4.3 analog input sampling and a/d conversion time the a/d converter has a built-in sample-and-hold circuit in a/d0, a/d1, and a/d2. the a/d converter samples the analog input at time t d (a/d conversion start delay time) after the adst bit is set to 1, then starts conversion. figure 17.6 shows the a/d conversion timing. the a/d conversion time (t conv ) includes t d and the analog input sampling time (t spl ). the length of t d is not fixed, since it includes the time required for synchronization of the a/d conversion operation. the total conversion time therefore varies within the ranges shown in table 17.4. in scan mode, the t conv values given in table 17.4 apply to the first conversion. in the second and subsequent conversions, t conv is fixed at 256 states when cks = 0 or 128 states when cks = 1. table 17.4 a/d conversion time (single mode) cks = 0: peripheral clock (p ) = 10 to 20 mhz cks = 1: peripheral clock (p ) = 10 mhz item symbol min typ max min typ max unit a/d conversion start delay time t d 10 ? 17 6 ? 9 input sampling time t spl ?64? ?32? a/d conversion time t conv 259 ? 266 131 ? 134 states (peripheral clock (p ))
rev. 3.0, 09/04, page 645 of 1086 a/d conversion sample-and-hold idle end of a/d conversion a/d conversion time (t conv ) analog input sampling time (t spl ) a/d conversion start delay time (t d ) write cycle a/d synchronization time (3 states) (up to 14 states) adst write timing ck address internal write signal a/d converter adf analog input sampling signal figure 17.6 a/d conversion timing
rev. 3.0, 09/04, page 646 of 1086 17.4.4 external triggering of a/d conversion the a/d converter can be activated by input of an external a/d conversion start trigger. to activate the a/d converter with an external trigger, first set the pin functions with the pfc (pin function controller), then set the trge bit to 1 in the a/d control register (adcr), and set the extrg bit to 1 in the a/d trigger register (adtrgr). when a low level is input to the adtrg pin after these settings have been made, the a/d converter detects the falling edge of a pulse and sets the adst bit to 1. figure 17.7 shows the timing for external trigger input. the adst bit is set to 1 two states after the a/d converter samples the falling edge on the adtrg pin. the timing from setting of the adst bit until the start of a/d conversion is the same as when 1 is written into the adst bit by software. pin sampled input adst bit ck adst = 1 figure 17.7 external trigger input timing
rev. 3.0, 09/04, page 647 of 1086 17.4.5 a/d converter activation by atu-ii the a/d0, a/d1, and a/d2 converter modules can be activated by an a/d conversion request from the atu-ii?s channel 0 interval timer. to activate the a/d converter by means of the atu-ii, set the trge bit to 1 in the a/d control register (adcr) and clear the extrg bit to 0 in the a/d trigger register (adtrgr). when an atu-ii channel 0 interval timer a/d conversion request is generated after these settings have been made, the adst bit set to 1. the timing from setting of the adst bit until the start of a/d conversion is the same as when 1 is written into the adst bit by software. 17.4.6 adend output pin when channel 31 is used in scan mode, the conversion timing can be monitored with the adend output pin. after the channel 31 analog voltage has been latched in scan mode, and conversion has started, the adend pin goes high. the adend pin subsequently goes low when channel 31 conversion ends. idle a/d conversion idle idle idle idle idle idle idle idle adend state of channel 28 (an28) state of channel 29 (an29) state of channel 30 (an30) state of channel 31 (an31) a/d conversion a/d conversion a/d conversion a/d conversion a/d conversion a/d conversion figure 17.8 adend output timing
rev. 3.0, 09/04, page 648 of 1086 17.5 interrupt sources and dma transfer requests the a/d converter can generate an a/d conversion end interrupt request (adi0, adi1, or adi2) upon completion of a/d conversions. the adi interrupt can be enabled by setting the adie bit in the a/d control/status register (adcsr) to 1, or disabled by clearing the adie bit to 0. the dmac can be activated by an adi interrupt. in this case an interrupt request is not sent to the cpu. when the dmac is activated by an adi interrupt, the adf bit in adcsr is automatically cleared when data is transferred by the dmac. see section 10.4.2, example of dma transfer between a/d converter and on-chip memory (address reload on), for an example of this operation. 17.6 usage notes the following points should be noted when using the a/d converter. 1. analog input voltage range the voltage applied to analog input pins during a/d conversion should be in the range av ss an n av ref . 2. relation between, av ss , av cc and v ss , v cc when using the a/d converter, set av cc = 5.0 v 0.5 v, and av ss = v ss . when the a/d converter is not used, set av ss = v ss , and do not leave the av cc pin open. 3. av ref input range set av ref = 4.5 v to av cc when the a/d converter is used, and av ref av cc when not used. if conditions above are not met, the reliability of the device may be adversely affected. 4. notes on board design in board design, digital circuitry and analog circuitry should be as mutually isolated as possible, and layout in which digital circuit signal lines and analog circuit signal lines cross or are in close proximity should be avoided as far as possible. failure to do so may result in incorrect operation of the analog circuitry due to inductance, adversely affecting a/d conversion values. also, digital circuitry must be isolated from the analog input signals (ann), analog reference voltage (av ref ), and analog power supply (av cc ) by the analog ground (av ss ). av ss should be connected at one point to a stable digital ground (v ss ) on the board. 5. notes on noise countermeasures a protection circuit connected to prevent damage due to an abnormal voltage such as an excessive surge at the analog input pins (ann) and analog reference voltage (avref) should be connected between avcc and avss as shown in figure 17.9.
rev. 3.0, 09/04, page 649 of 1086 also, the bypass capacitors connected to avcc and avref and the filter capacitor connected to ann must be connected to avss. if a filter capacitor is connected as shown in figure 17.9, the input currents at the analog input pins (ann) are averaged, and so an error may arise. careful consideration is therefore required when deciding the circuit constants. av cc av ref an0 ? an31 av ss sh7058 notes: 10 f 0.01 f r in * 2 * 1 * 1 0.1 f 100 ? 1. 2. r in : input impedance figure 17.9 example of analog input pin protection circuit table 17.5 analog pin specifications item min max unit analog input capacitance ? 20 pf permissible signal source impedance ? 3 k ? 17.6.1 a/d conversion accuracy definitions a/d conversion accuracy definitions are given below. 1. resolution the number of a/d converter digital conversion output codes
rev. 3.0, 09/04, page 650 of 1086 2. offset error the deviation of the analog input voltage value from the ideal a/d conversion characteristic when the digital output changes from the minimum voltage value 0000000000 to 0000000001 (does not include quantization error) (see figure 17.10). 3. full-scale error the deviation of the analog input voltage value from the ideal a/d conversion characteristic when the digital output changes from 1111111110 to 111111111 (does not include quantization error) (see figure 17.10). 4. quantization error the deviation inherent in the a/d converter, given by 1/2 lsb (see figure 17.10). 5. nonlinearity error the error with respect to the ideal a/d conversion characteristic between the zero voltage and the full-scale voltage. does not include the offset error, full-scale error, or quantization error. 6. absolute accuracy the deviation between the digital value and the analog input value. includes the offset error, full-scale error, quantization error, and nonlinearity error. digital output 111 110 101 100 011 010 001 1/8 2/8 3/8 4/8 5/8 6/8 7/8 fs 000 analog input voltage quantization error ideal a/d conversion characteristic digital output fs analog input voltage offset error ideal a/d conversion characteristic actual a/d conversion characteristic full-scale error nonlinearity error figure 17.10 a/d conversion accuracy definitions
rev. 3.0, 09/04, page 651 of 1086 section 18 multi-trigger a/d converter (mtad) 18.1 overview the multi-trigger a/d converter (mtad) is composed of two independent modules a/d0 and a/d1, as listed below. module analog group channels a/d0 analog group 2 an8 to an11 a/d1 analog group 5 an20 to an23 18.1.1 feature the feature of the multi-trigger a/d conversion is shown below. ? multi-trigger a/d conversion mode while performing conversion on the specified channels in scan mode, a/d conversion on the channels for which conversion has been requested can be performed prior to the other channels when a compare match occurs with respect to the timer in the a/d converter. 18.1.2 block diagram figure 18.1 shows a block diagram of the multi-trigger a/d converter.
rev. 3.0, 09/04, page 652 of 1086 module data bus module data bus timer control logic a/d conversion part 10-bit d/a sample-and- hold circuit a/d conversion control circuit priority internal data bus clock select channel a interrupt a/d channel b interrupt a/d interrupt a/d end a/d conversion control circuit priority channel a interrupt a/d channel b interrupt a/d interrupt a/d end adcnt0 adgr0a adgr0b adcylr0 addr0a addr0b adtier0 adtsr0 adcsr0 to 7 adcsr8 to adcsr0 adcr0 adtrgr0 + - adi0 avcc avref avss an0 an1 an2 an3 an4 an5 an6 an7 an8 an9 an10 an11 atu0 adtrg0 adt00a adt00b adt0 module data bus module data bus timer control logic a/d timer part a/d conversion part internal data bus clock select adcnt1 adgr1a adgr1b adcylr1 addr1a addr1b adtier1 adtsr1 adcsr 12 to 19 adcsr 20 to 23 adcsr1 adcr1 adtrgr1 + - adi1 avcc avref avss an12 an13 an14 an15 an16 an17 an18 an19 an20 an21 an22 an23 atu1 adtrg1 adt01a adt01b adt1 timer control logic analog multiplexer successive- approximation register 10-bit d/a analog multiplexer successive- approximation register bus interface bus interface bus interface bus interface a/d timer part figure 18.1 simplified block diagram of multi-trigger a/d converter
rev. 3.0, 09/04, page 653 of 1086 18.1.3 input/output pins table 18.1 summarizes the multi-trigger a/d converter output pins. when using these external pins, the pin function controller (pfc) should also be set in accordance with the a/d conversion settings. table 18.1 pin configuration channel pin name abbreviation i/o function 0 a/d timer output 0a adto0a output pwm output 0 a/d timer output 0b adto0b output pwm output 1 a/d timer output 1a adto1a output pwm output 1 a/d timer output 1b adto1b output pwm output 18.1.4 register configuration channel register name abbreviation r/w initial value address access size 0 a/d free-running counter adcnt0 r/w h'0001 h'fffff860 (upper byte) h'fffff861 (lower byte) 16 0 a/d cycle register 0 adcylr0 r/w h'ffff h'fffff862 (upper byte) h'fffff863 (lower byte) 16 0 a/d duty register 0a addr0a r/w h'ffff h'fffff864 (upper byte) h'fffff865 (lower byte) 16 0 a/d duty register 0b addr0b r/w h'ffff h'fffff866 (upper byte) h'fffff867 (lower byte) 16 0 a/d general register 0a adgr0a r/w h'ffff h'fffff868 (upper byte) h'fffff869 (lower byte) 16 0 a/d general register 0b adgr0b r/w h'ffff h'fffff86a (upper byte) h'fffff86b (lower byte) 16
rev. 3.0, 09/04, page 654 of 1086 channel register name abbreviation r/w initial value address access size 0 a/d trigger control register 0 adtcr0 r/w h'00 h'fffff86c 8 0 a/d trigger status register 0 adtsr0 r/(w) * h'00 h'fffff86d 8 0 a/d trigger interrupt enable register 0 adtier0 r/w h'00 h'fffff86e 8 1 a/d free-running counter 1 adcnt1 r/w h'0001 h'fffff870 (upper byte) h'fffff871 (lower byte) 16 1 a/d cycle register 1 adcylr1 r/w h'ffff h'fffff872 (upper byte) h'fffff873 (lower byte) 16 1 a/d duty register 1a addr1a r/w h'ffff h'fffff874 (upper byte) h'fffff875 (lower byte) 16 1 a/d duty register 1b addr1b r/w h'ffff h'fffff876 (upper byte) h'fffff877 (lower byte) 16 1 a/d general register 1a adgr1a r/w h'ffff h'fffff878 (upper byte) h'fffff879 (lower byte) 16 1 a/d general register 1b adgr1b r/w h'ffff h'fffff87a (upper byte) h'fffff87b (lower byte) 16 1 a/d trigger control register adtcr1 r/w h'00 h'fffff87c 8 1 a/d trigger status register 1 adtsr1 r/(w) * h'00 h'fffff87d 8 1 a/d trigger interrupt enable register 1 adtier1 r/w h'00 h'fffff87e 8 note: * only 0 can be written.
rev. 3.0, 09/04, page 655 of 1086 18.2 register descriptions 18.2.1 a/d trigger control registers 0 and 1 (adtcr0 and adtcr1) a/d trigger control registers 0 and 1 (adtcr0 and adtcr1) are 8-bit readable/writable registers whose functions include selection of the prescaler. adtcr0 and adtcr1 are initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode. 0 00000 0 0 initial value: r r r/w r/w r/w r/w r/w r/w r/w: adselxa 4 53210 6 7 bit: dtselxb cksel1x cksel0x dtselxa adselxb ? bits 7 and 6?clock select 1 and 0 (cksel1x and cksel0x): halt the counter or select internal clock ? from among /2, /5, and /10, which are obtained by dividing clock . bit 7: cksel1x bit 6: cksel0x description 0 0 counter is halted 0 1 counter is incremented with internal clock = /2 1 0 counter is incremented with internal clock = /5 1 1 counter is incremented with internal clock = /10 ? bits 5 and 4?reserved: these bits are always read as 0. the write value should always be 0. ? bit 3?duty select 1b or 0b (dtsel1b or dtsel0b): selects either on-duty or off-duty for the pwm output from adtoxb of channel xb. bit 3: dtselxb description 0 on-duty for the pwm output from adtoxb (initial value) 1 off-duty for the pwm output from adtoxb note: x = 0 or 1.
rev. 3.0, 09/04, page 656 of 1086 ? bit 2?duty select 1a or 0a (dtsel1a or dtsel0a): selects either on-duty or off-duty for the pwm output from adtoxa of channel xa. bit 2: dtselxa description 0 on-duty for the pwm output from adtoxa (initial value) 1 off-duty for the pwm output from adtoxa note: x = 0 or 1. ? bit 1?a/d data select 1b (adsel1b): selects the register to which the result of multi- trigger a/d conversion is transferred. this bit is inverted when the addr register is updated by the multi-trigger a/d conversion. switching settings during the multi-trigger a/d conversion operation should be carried out when tadf1b (adtsr1 register) is 1. bit 1: adsel1b description 0 conversion result is transferred to addr22 (initial value) 1 conversion result is transferred to addr23 ? bit 1?a/d data select 0b (adsel0b): selects the register to which the result of multi- trigger a/d conversion is transferred. this bit is inverted when the addr register is updated by the multi-trigger a/d conversion. switching settings during the multi-trigger a/d conversion operation should be carried out when tadf0b (adtsr0 register) is set to 1. bit 1: adsel0b description 0 conversion result is transferred to addr10 (initial value) 1 conversion result is transferred to addr11
rev. 3.0, 09/04, page 657 of 1086 ? bit 0?a/d data select 1a (adsel1a): selects the register to which the result of multi- trigger a/d conversion is transferred. this bit is inverted when the addr register is updated by the multi-trigger a/d conversion. switching settings during the multi-trigger a/d conversion operation should be carried out when tadf1a (adtsr1 register) is set to 1. bit 0: adsel1a description 0 conversion result is transferred into addr20 (initial value) 1 conversion result is transferred into addr21 ? bit 0?a/d data select 0a (adsel0a): selects the register to which the result of multi- trigger a/d conversion is transferred. this bit is inverted when the addr register is updated by the multi-trigger a/d conversion. switching settings during the multi-trigger a/d conversion operation should be carried out when tadf0a (adtsr0 register) is set to 1. bit 0: adsel0a description 0 conversion result is transferred to addr8 (initial value) 1 conversion result is transferred to addr9 18.2.2 a/d trigger status registers 0 and 1 (adtsr0 and adtsr1) a/d trigger status registers 0 and 1 (adtsr0 and adtsr1) indicate the compare match generation and the multi-trigger a/d conversion status in channels 0 and 1. adtsr0 and adtsr1 are initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode. 0 00000 0 0 initial value: r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/w: adcmfxa 4 53210 6 7 bit: addfxa addfxb tadfxb tadfxa adcylfx adcmfxb note: x = 0 or 1. * only 0 can be written, to clear the flag.
rev. 3.0, 09/04, page 658 of 1086 ? bit 7?reserved: this bit is always read as 0. the write value should always be 0. ? bit 6?trigger a/d flag b (tadfxb): indicates the end of multi-trigger a/d conversion b. bit 6: tadfxb description 0 indicates that the multi-trigger a/d converter is performing a/d conversion b, or the converter is in the idle state (initial value) [clearing condition] when tadfxb is read while set to 1, then 0 is written to tadfxb 1 indicates that the multi-trigger a/d converter has finished a/d conversion b, and the digital value has been transferred to addr [setting condition] when multi-trigger a/d conversion b ends note: x = 0 or 1. ? bit 5?trigger a/d flag a (tadfxa): indicates the end of multi-trigger a/d conversion a. bit 5: tadfxa description 0 indicates that the multi-trigger a/d converter is performing a/d conversion a, or the converter is in the idle state (initial value) [clearing condition] when tadfxa is read while set to 1, then 0 is written to tadfxa 1 indicates that the multi-trigger a/d converter has finished a/d conversion a, and the digital value has been transferred to addr [setting condition] when multi-trigger a/d conversion a ends note: x = 0 or 1. ? bit 4?a/d duty flag b (addfxb): indicates whether or not the addrxb and adcnt values have matched. bit 4: addfxb description 0 [clearing condition] (initial value) when addfxb is read while set to 1, then 0 is written to addfxb 1 [setting condition] when adcntx and addrxb values have matched note: x = 0 or 1.
rev. 3.0, 09/04, page 659 of 1086 ? bit 3?a/d duty flag a (addfxa): indicates whether or not the addrxa and adcnt values have matched. bit 3: addfxa description 0 [clearing condition] (initial value) when addfxa is read while set to 1, then 0 is written to addfxa 1 [setting condition] when adcntx and addrxa values have matched note: x = 0 or 1. ? bit 2?a/d cycle compare match flow flag (adcylfx): indicates whether or not the adcylrx and adcnt values have matched. bit 2: adcylfx description 0 [clearing condition] (initial value) when adcylfx is read while set to 1, then 0 is written to adcylfx 1 [setting condition] when adcntx and adcylrx values have matched note: x = 0 or 1. ? bit 1?a/d compare match flag (adcmfxb): indicates whether or not the adgrxb and adcnt values have matched. bit 1: adcmfxb description 0 [clearing condition] (initial value) when adcmfxb is read while set to 1, then 0 is written to adcmfxb 1 [setting condition] when adcntx and adgrxb values have matched note: x = 0 or 1.
rev. 3.0, 09/04, page 660 of 1086 ? bit 0?a/d compare match flag (adcmfxa): indicates whether or not the adgrxa and adcnt values have matched. bit 0: adcmfxa description 0 [clearing condition] (initial value) when adcmfxa is read while set to 1, then 0 is written to adcmfxa 1 [setting condition] when adcntx and adgrxa values have matched note: x = 0 or 1. 18.2.3 a/d trigger interrupt enable registers 0 and 1 (adtier0 and adtier1) a/d trigger interrupt enable registers 0 and 1 (adtier0 and adtier1) enable or disable interrupt request triggered by the compare match generation and multi-trigger a/d conversion end in channels 0 and 1. adtier0 and adtier1 are initialized to h'00 by a power-on reset, and in hardware standby mode and software standby mode. 0 0 0000 0 0 initial value: r/w r/w r/w r/w r/w r/w r/w r/w r/w: adcnexa 4 5 3210 6 7 bit: addexa adtrgx tadexb tadexa addexb adcylex adcmexb note: x = 0 or 1. ? bit 7?adt trigger (adtrgx): enables or disables triggering of multi-trigger a/d conversion by a compare match between adcntx and adgrxa or adgrxb. to prevent incorrect operation, ensure that the adst bit in a/d control register (adcr) is 0 before switching this setting. bit 1: adtrgx description 0 triggering of multi-trigger a/d conversion by a compare match between adcntx and adgrxa or adgrxb is disabled (initial value) 1 triggering of multi-trigger a/d conversion by a compare match between adcntx and adgrxa or adgrxb is enabled notes: 1. x = 0 or 1. 2. value 1 can be set to adtrgx only for the cases below; 0 should always be set for the other cases.
rev. 3.0, 09/04, page 661 of 1086 conversion mode (adcr): continuous scan channels for conversion (adcsrx): bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 analog input channels adm1 adm0 ch3 ch2 ch1 ch0 a/d0 a/d1 010011an0 to an3 an12 to an15 100011an0 to an7 an12 to an19 010111an4 to an7 an16 to an19 notes: 1. x = 0 or 1. 2. for the adcr and adcsrx settings, refer to section 17, a/d converter. ? bit 6?trigger a/d interrupt enable b (tadexb): enables or disables the interrupt request by tadfxb when the trigger a/d flag xb (tadfxb) in adtsr is set to 1. to prevent incorrect operation, ensure that the adtrg bit in a/d trigger interrupt enable register (adtier0 or adtier1) is 0 before switching this setting. bit 6: tadexb description 0 the interrupt request (tadixb) by tadfxb is disabled (initial value) 1 the interrupt request (tadixb) by tadfxb is enabled when multi-trigger a/d conversion b ends, setting tadfxb to 1, a trigger a/d interrupt for a/d0 or a/d1 (tadixb) is requested if tadexb is 1. tadixb can be cleared to 0 by clearing tadfxb or tadexb to 0. ? bit 5?trigger a/d interrupt enable a (tadexa): enables or disables the interrupt request by tadfxa when the trigger a/d flag xa (tadfxa) in adtsr is set to 1. to prevent incorrect operation, ensure that the adtrg bit in a/d trigger interrupt enable register (adtier0 or adtier1) is 0 before switching this setting. bit 5: tadexa description 0 the interrupt request (tadixa) by tadfxa is disabled (initial value) 1 the interrupt request (tadixa) by tadfxa is enabled when multi-trigger a/d conversion a ends setting tadfxa to 1, a trigger a/d interrupt for a/d0 or a/d1 (tadixa) is requested if tadexa is 1. tadixa can be cleared to 0 by clearing tadfxa or tadexa to 0.
rev. 3.0, 09/04, page 662 of 1086 ? bit 4?a/d duty interrupt enable b (addexb): enables or disables the interrupt request by addfxb when the addrxb compare match flag (addfxb) in adtsr is set to 1. bit 4: addexb description 0 the interrupt request (addixb) by addfxb is disabled (initial value) 1 the interrupt request (addixb) by addfxb is enabled note: x = 0 or 1. ? bit 3?a/d duty interrupt enable a (addexa): enables or disables the interrupt request by addfxa when the addrxa compare match flag (addfxa) in adtsr is set to 1. bit 3: addexa description 0 the interrupt request (addixa) by addfxa is disabled (initial value) 1 the interrupt request (addixa) by addfxa is enabled note: x = 0 or 1. ? bit 2?a/d cycle interrupt enable (adcylex): enables or disables the interrupt request by adcylfx when the a/d cycle compare match flow flag (adcylfx) in adtsrx is set to 1. bit 2: adcylex description 0 the interrupt request (adcyix) by adcylfx is disabled (initial value) 1 the interrupt request (adcyix) by adcylfx is enabled note: x = 0 or 1. ? bit 1?a/d compare match interrupt enable b (adcmexb): enables or disables the interrupt request by adcmfxb when the addrxb compare match flag (adcmfxb) in adtsr is set to 1. bit 1: adcmexb description 0 the interrupt request (addixb) by adcmfxb is disabled (initial value) 1 the interrupt request (addixb) by adcmfxb is enabled note: x = 0 or 1.
rev. 3.0, 09/04, page 663 of 1086 ? bit 0?a/d compare match interrupt enable a (adcmexa): enables or disables the interrupt request by adcmfxa when the addrxa compare match flag (adcmfxa) in adtsr is set to 1. bit 0: adcmexa description 0 the interrupt request (addixa) by adcmfxa is disabled (initial value) 1 the interrupt request (addixa) by adcmfxa is enabled note: x = 0 or 1. 18.2.4 a/d free-running counters (adcnt0 and adcnt1) a/d free-running counters 0 and 1 (adcnt0 and adcnt1) are 16-bit readable/writable registers that start incrementing according to the setting of the a/d trigger control registers (adtcr0 and adtcr1). the clock selected by the prescaler (adtcr0 and adtcr1) is input to the corresponding counters. adcnt0 and adcnt1 are initialized to h'0001 by a power-on reset, and in hardware standby mode and software standby mode. adcnt0 and adcnt1 can only be read from or written to in words. 0 0 0001 0 0 initial value: r/w r/w r/w r/w r/w r/w r/w r/w r/w: 8 10 6420 12 14 0 0 0000 0 0 r/w r/w r/w r/w r/w r/w r/w r/w 9 11 7531 13 15 bit:
rev. 3.0, 09/04, page 664 of 1086 18.2.5 a/d general registers a and b (adgr0a, adgr0b, adgr1a, and adgr1b) a/d general registers (adgr0a, adgr0b, adgr1a, and adgr1b) are 16-bit readable/writable registers. two registers are provided for each of channels 0 and 1. the adgr value is constantly compared with the corresponding free-running counter (adcnt0 or adcnt1) value. when the two values match, the adcmfxa and adcmfxb bits in the corresponding a/d trigger status register (adtsr) are set to 1, which requests initiation of the multi-trigger a/d conversion. adgr0a, adgr0b, adgr1a, and adgr1b can only be read from or written to in words. adgr0a, adgr0b, adgr1a, and adgr1b are initialized to h'ffff by a power-on reset, and in hardware standby mode and software standby mode. 1 11111 1 1 initial value: r/w r/w r/w r/w r/w r/w r/w r/w r/w: 8 10 6 4 2 0 12 14 1 11111 1 1 r/w r/w r/w r/w r/w r/w r/w r/w 9 11 7 5 3 1 13 15 bit: 18.2.6 a/d cycle registers 0 and 1 (adcylr0 and adcylr1) a/d cycle registers (adcylr0 and adcylr1) are 16-bit readable/writable registers. one register is provided for each of channels 0 and 1. the adcylr value is constantly compared with the corresponding free-running counter (adcnt0 or adcnt1) value. when the two values match, the adcylfx bit in the corresponding a/d trigger status register (adtsr) is set to 1, which clears adcnt0 and adcnt1 to h'0001. adcylr0 and adcylr1 can only be read from or written to in words. adcylr0 and adcylr1 are initialized to h'ffff by a power-on reset, and in hardware standby mode and software standby mode. 1 11111 1 1 initial value: r/w r/w r/w r/w r/w r/w r/w r/w r/w: 8 10 6 4 2 0 12 14 1 11111 1 1 r/w r/w r/w r/w r/w r/w r/w r/w 9 11 7 5 3 1 13 15 bit:
rev. 3.0, 09/04, page 665 of 1086 18.2.7 a/d duty registers a and b (addr0a, addr0b, addr1a, and addr1b) a/d duty registers (addr0a, addr0b, addr1a, and addr1b) are 16-bit readable/writable registers. two registers are provided for each of channels 0 and 1. the addr value is constantly compared with the corresponding free-running counter (adcnt0 or adcnt1) value. when the two values match, the addfxa and addfxb bits in the corresponding a/d trigger status register (adtsr) are set to 1. addr0a, addr0b, addr1a, and addr1b can only be read from or written to in words. addr0a, addr0b, addr1a, and addr1b are initialized to h'ffff by a power-on reset, and in hardware standby mode and software standby mode. 1 1 1111 1 1 initial value: r/w r/w r/w r/w r/w r/w r/w r/w r/w: 8 10 6420 12 14 1 1 1111 1 1 r/w r/w r/w r/w r/w r/w r/w r/w 9 11 7531 13 15 bit:
rev. 3.0, 09/04, page 666 of 1086 18.3 interrupt interface 18.3.1 on-chip peripheral module interrupts on-chip peripheral module interrupts are interrupts generated by the following on-chip peripheral modules: ? direct memory access controller (dmac) ? advanced timer unit (atu-ii) ? compare match timer (cmt) ? a/d converter (a/d) ? multi-trigger a/d (mtad) ? serial communication interface (sci) ? watchdog timer (wdt) ? controller area network (hcan) a different interrupt vector is assigned to each interrupt source, so the exception service routine does not have to decide which interrupt has occurred. priority levels between 0 and 15 can be assigned to individual on-chip peripheral modules in interrupt priority registers c?l (iprc? iprl). on-chip peripheral module interrupt exception processing sets the interrupt mask level bits (i3?i0) in the status register (sr) to the priority level value of the on-chip peripheral module interrupt that was accepted. 18.3.2 interrupt exception vectors and priority rankings table 18.2 lists interrupt sources and their vector numbers, vector table address offsets and interrupt priorities. each interrupt source is allocated a different vector number and vector table address offset. vector table addresses are calculated from vector numbers and address offsets. in interrupt exception processing, the exception service routine start address is fetched from the vector table indicated by the vector table address. see table 6.4, calculating exception processing vector table addresses, in section 6, exception processing. irq interrupts and on-chip peripheral module interrupt priorities can be set freely between 0 and 15 for each pin or module by setting interrupt priority registers a?l (ipra?iprl). the ranking of interrupt sources for iprc?iprl, however, must be the order listed under priority within ipr setting range in table 18.2 and cannot be changed. a power-on reset assigns priority level 0 to irq interrupts and on-chip peripheral module interrupts. if the same priority level is assigned to
rev. 3.0, 09/04, page 667 of 1086 two or more interrupt sources and interrupts from those sources occur simultaneously, their priority order is the default priority order indicated at the right in table 18.2. table 18.2 interrupt exception processing vectors and priorities interrupt vector interrupt priority interrupt source vector no. vector table address offset priority (initial value) corre- sponding ipr (bits) within ipr setting range default priority nmi 11 h'0000002c to h'0000002f 16 ? ? high ubc 12 h'00000030 to h'00000033 15 ? ? h-udi 14 h'00000038 to h'0000003b 15 ? ? irq0 64 h'00000100 to h'00000103 0 to 15 (0) ipra (15?12) ? irq1 65 h'00000104 to h'00000107 0 to 15 (0) ipra (11?8) ? irq2 66 h'00000108 to h'0000010b 0 to 15 (0) ipra (7?4) ? irq3 67 h'0000010c to h'0000010f 0 to 15 (0) ipra (3?0) ? irq4 68 h'00000110 to h'00000113 0 to 15 (0) iprb (15?12) ? irq5 69 h'00000114 to h'00000117 0 to 15 (0) iprb (11?8) ? irq6 70 h'00000118 to h'0000011b 0 to 15 (0) iprb (7?4) ? irq7 71 h'0000011c to h'0000011f 0 to 15 (0) iprb (3?0) ? dmac0 dei0 72 h'00000120 to h'00000123 0 to 15 (0) 1 dmac1 dei1 74 h'00000128 to h'0000012b 0 to 15 (0) iprc (15?12) 2 dmac2 dei2 76 h'00000130 to h'00000133 0 to 15 (0) 1 dmac3 dei3 78 h'00000138 to h'0000013b 0 to 15 (0) iprc (11?8) 2 low
rev. 3.0, 09/04, page 668 of 1086 table 18.2 interrupt exception processing vectors and priorities (cont) interrupt vector interrupt priority interrupt source vector no. vector table address offset priority (initial value) corre- sponding ipr (bits) within ipr setting range default priority atu01 itv1/ itv2a/ itv2b 80 h'00000140 to h'00000143 0 to 15 (0) iprc (7?4) high ici0a 84 h'00000150 to h'00000153 1 atu02 ici0b 86 h'00000158 to h'0000015b 0 to 15 (0) iprc (3?0) 2 ici0c 88 h'00000160 to h'00000163 1 atu03 ici0d 90 h'00000168 to h'0000016b 0 to 15 (0) iprd (15?12) 2 atu0 atu04 ovi0 92 h'00000170 to h'00000173 0 to 15 (0) iprd (11?8) imi1a/ cmi1 96 h'00000180 to h'00000183 1 imi1b 97 h'00000184 to h'00000187 2 imi1c 98 h'00000188 to h'0000018b 3 atu11 imi1d 99 h'0000018c to h'0000018f 0 to 15 (0) iprd (7?4) 4 imi1e 100 h'00000190 to h'00000193 1 imi1f 101 h'00000194 to h'00000197 2 imi1g 102 h'00000198 to h'0000019b 3 atu12 imi1h 103 h'0000019c to h'0000019f 0 to 15 (0) iprd (3?0) 4 atu1 atu13 ovi1a/ ovi1b 104 h'000001a0 to h'000001a3 0 to 15 (0) ipre (15?12) low
rev. 3.0, 09/04, page 669 of 1086 table 18.2 interrupt exception processing vectors and priorities (cont) interrupt vector interrupt priority interrupt source vector no. vector table address offset priority (initial value) corre- sponding ipr (bits) within ipr setting range default priority imi2a/ cmi2a 108 h'000001b0 to h'000001b3 1high imi2b/ cmi2b 109 h'000001b4 to h'000001b7 2 imi2c/ cmi2c 110 h'000001b8 to h'000001bb 3 atu21 imi2d/ cmi2d 111 h'000001bc to h'000001bf 0 to 15 (0) ipre (11?8) 4 imi2e/ cmi2e 112 h'000001c0 to h'000001c3 1 imi2f/ cmi2f 113 h'000001c4 to h'000001c7 2 imi2g/ cmi2g 114 h'000001c8 to h'000001cb 3 atu22 imi2h/ cmi2h 115 h'000001cc to h'000001cf 0 to 15 (0) ipre (7?4) 4 atu2 atu23 ovi2a/ ovi2b 116 h'000001d0 to h'000001d3 0 to 15 (0) ipre (3?0) imi3a 120 h'000001e0 to h'000001e3 1 imi3b 121 h'000001e4 to h'000001e7 2 imi3c 122 h'000001e8 to h'000001eb 3 atu31 imi3d 123 h'000001ec to h'000001ef 0 to 15 (0) iprf (15?12) 4 atu3 atu32 ovi3 124 h'000001f0 to h'000001f3 0 to 15 (0) iprf (11?8) low
rev. 3.0, 09/04, page 670 of 1086 table 18.2 interrupt exception processing vectors and priorities (cont) interrupt vector interrupt priority interrupt source vector no. vector table address offset priority (initial value) corre- sponding ipr (bits) within ipr setting range default priority imi4a 128 h'00000200 to h'00000203 1high imi4b 129 h'00000204 to h'00000207 2 imi4c 130 h'00000208 to h'0000020b 3 atu41 imi4d 131 h'0000020c to h'0000020f 0 to 15 (0) iprf (7?4) 4 atu4 atu42 ovi4 132 h'00000210 to h'00000213 0 to 15 (0) iprf (3?0) imi5a 136 h'00000220 to h'00000223 1 imi5b 137 h'00000224 to h'00000227 2 imi5c 138 h'00000228 to h'0000022b 3 atu51 imi5d 139 h'0000022c to h'0000022f 0 to 15 (0) iprg (15?12) 4 atu5 atu52 ovi5 140 h'00000230 to h'00000233 0 to 15 (0) iprg (11?8) cmi6a 144 h'00000240 to h'00000243 1 cmi6b 145 h'00000244 to h'00000247 2 cmi6c 146 h'00000248 to h'0000024b 3 atu6 cmi6d 147 h'0000024c to h'0000024f 0 to 15 (0) iprg (7?4) 4 low
rev. 3.0, 09/04, page 671 of 1086 table 18.2 interrupt exception processing vectors and priorities (cont) interrupt vector interrupt priority interrupt source vector no. vector table address offset priority (initial value) corre- sponding ipr (bits) within ipr setting range default priority cmi7a 148 h'00000250 to h'00000253 1high cmi7b 149 h'00000254 to h'00000257 2 cmi7c 150 h'00000258 to h'0000025b 3 atu7 cmi7d 151 h'0000025c to h'0000025f 0 to 15 (0) iprg (3?0) 4 osi8a 152 h'00000260 to h'00000263 1 osi8b 153 h'00000264 to h'00000267 2 osi8c 154 h'00000268 to h'0000026b 3 atu81 osi8d 155 h'0000026c to h'0000026f 0 to 15 (0) iprh (15?12) 4 osi8e 156 h'00000270 to h'00000273 1 osi8f 157 h'00000274 to h'00000277 2 osi8g 158 h'00000278 to h'0000027b 3 atu82 osi8h 159 h'0000027c to h'0000027f 0 to 15 (0) iprh (11?8) 4 osi8i 160 h'00000280 to h'00000283 1 osi8j 161 h'00000284 to h'00000287 2 osi8k 162 h'00000288 to h'0000028b 3 atu8 atu83 osi8l 163 h'0000028c to h'0000028f 0 to 15 (0) iprh (7?4) 4 low
rev. 3.0, 09/04, page 672 of 1086 table 18.2 interrupt exception processing vectors and priorities (cont) interrupt vector interrupt priority interrupt source vector no. vector table address offset priority (initial value) corre- sponding ipr (bits) within ipr setting range default priority osi8m 164 h'00000290 to h'00000293 1high osi8n 165 h'00000294 to h'00000297 2 osi8o 166 h'00000298 to h'0000029b 3 atu8 atu84 osi8p 167 h'0000029c to h'0000029f 0 to 15 (0) iprh (3?0) 4 cmi9a 168 h'000002a0 to h'000002a3 1 cmi9b 169 h'000002a4 to h'000002a7 2 cmi9c 170 h'000002a8 to h'000002ab 3 atu91 cmi9d 171 h'000002ac to h'000002af 0 to 15 (0) ipri (15?12) 4 cmi9e 172 h'000002b0 to h'000002b3 1 atu9 atu92 cmi9f 174 h'000002b8 to h'000002bb 0 to 15 (0) ipri (11?8) 2 cmi10a 176 h'000002c0 to h'000002c3 1 atu101 cmi10b 178 h'000002c8 to h'000002cb 0 to 15 (0) ipri (7?4) 2 atu10 atu102 ici10a/ cmi10g 180 h'000002d0 to h'000002d3 0 to 15(0) ipri (3?0) imi11a 184 h'000002e0 to h'000002e3 1 imi11b 186 h'000002e8 to h'000002eb 2 atu11 ovi11 187 h'000002ec to h'000002ef 0 to 15 (0) iprj (15?12) 3 low
rev. 3.0, 09/04, page 673 of 1086 table 18.2 interrupt exception processing vectors and priorities (cont) interrupt vector interrupt priority interrupt source vector no. vector table address offset priority (initial value) corre- sponding ipr (bits) within ipr setting range default priority cmt0 cmti0 188 h'000002f0 to h'000002f3 1high mtad0 adt0 189 h'000002f4 to h'000002f7 2 a/d0 adi0 190 h'000002f8 to h'000002fb 0 to 15 (0) i prj (11?8) 3 cmt1 cmti1 192 h'00000300 to h'00000303 1 mtad1 adt1 193 h'00000304 to h'00000307 2 a/d1 adi1 194 h'00000308 to h'0000030b 0 to 15 (0) iprj (7?4) 3 a/d2 adi2 196 h'00000310 to h'00000313 0 to 15 (0) iprj (3?0) eri0 200 h'00000320 to h'00000323 1 rxi0 201 h'00000324 to h'00000327 2 txi0 202 h'00000328 to h'0000032b 3 sci0 tei0 203 h'0000032c to h'0000032f 0 to 15 (0) iprk (15?12) 4 eri1 204 h'00000330 to h'00000333 1 rxi1 205 h'00000334 to h'00000337 2 txi1 206 h'00000338 to h'0000033b 3 sci1 tei1 207 h'0000033c to h'0000033f 0 to 15 (0) iprk (11?8) 4 low
rev. 3.0, 09/04, page 674 of 1086 table 18.2 interrupt exception processing vectors and priorities (cont) interrupt vector interrupt priority interrupt source vector no. vector table address offset priority (initial value) corre- sponding ipr (bits) within ipr setting range default priority eri2 208 h'00000340 to h'00000343 1high rxi2 209 h'00000344 to h'00000347 2 txi2 210 h'00000348 to h'0000034b 3 sci2 tei2 211 h'0000034c to h'0000034f 0 to 15 (0) iprk (7?4) 4 eri3 212 h'00000350 to h'00000353 1 rxi3 213 h'00000354 to h'00000357 2 txi3 214 h'00000358 to h'0000035b 3 sci3 tei3 215 h'0000035c to h'0000035f 0 to 15 (0) iprk (3?0) 4 eri4 216 h'00000360 to h'00000363 1 rxi4 217 h'00000364 to h'00000367 2 txi4 218 h'00000368 to h'0000036b 3 sci4 tei4 219 h'0000036c to h'0000036f 0 to 15 (0) iprl (15?12) 4 ers0 220 h'00000370 to h'00000373 1 ovr0 221 h'00000374 to h'00000377 2 rm0 222 h'00000378 to h'0000037b 3 hcan0 sle0 223 h'0000037c to h'0000037f 0 to 15 (0) iprl (11?8) 4 low
rev. 3.0, 09/04, page 675 of 1086 table 18.2 interrupt exception processing vectors and priorities (cont) interrupt vector interrupt priority interrupt source vector no. vector table address offset priority (initial value) corre- sponding ipr (bits) within ipr setting range default priority wdt iti 224 h'00000380 to h'00000383 0 to 15 (0) iprl (7?4) high ers1 228 h'00000390 to h'00000393 1 ovr1 229 h'00000394 to h'00000397 2 rm1 230 h'00000398 to h'0000039b 3 hcan1 sle1 231 h'0000039c to h'0000039f 0 to 15 (0) iprl (3?0) 4 low 18.3.3 interrupt priority registers a?l (ipra?iprl) interrupt priority registers a?l (ipra?iprl) are 16-bit readable/writable registers that set priority levels from 0 to 15 for irq interrupts and on-chip peripheral module interrupts. correspondence between interrupt request sources and each of the ipra?iprl bits is shown in table 18.3. bit: 15 14 13 12 11 10 9 8 initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit:76543210 initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w
rev. 3.0, 09/04, page 676 of 1086 table 18.3 interrupt request sources and ipra?iprl bits register 15?12 11?8 7?4 3?0 interrupt priority register a irq0 irq1 irq2 irq3 interrupt priority register b irq4 irq5 irq6 irq7 interrupt priority register c dmac0, 1 dmac2, 3 atu01 atu02 interrupt priority register d atu03 atu04 atu11 atu12 interrupt priority register e atu13 atu21 atu22 atu23 interrupt priority register f atu31 atu32 atu41 atu42 interrupt priority register g atu51 atu52 atu6 atu7 interrupt priority register h atu81 atu82 atu83 atu84 interrupt priority register i atu91 atu92 atu101 atu102 interrupt priority register j atu11 cmt0, a/d0, mtad0 cmt1, a/d1, mtad1 a/d2 interrupt priority register k sci0 sci1 sci2 sci3 interrupt priority register l sci4 hcan0 wdt hcan1 as indicated in table 18.3, four irq pins or groups of 4 on-chip peripheral modules are allocated to each register. each of the corresponding interrupt priority ranks are established by setting a value from h'0 (0000) to h'f (1111) in each of the four-bit groups 15?12, 11?8, 7?4 and 3?0. interrupt priority rank becomes level 0 (lowest) by setting h'0, and level 15 (highest) by setting h'f. if multiple on-chip peripheral modules are assigned to the same bit (dmac0 and dmac1, dmac2 and dmac3, cmt0, a/d0, and mtad0, and cmt1, a/d1, and mtad1 ), those multiple modules are set to the same priority rank. ipra?iprl are initialized to h'0000 by a reset and in hardware standby mode. they are not initialized in software standby mode.
rev. 3.0, 09/04, page 677 of 1086 18.4 pfc and i/o port interfaces 18.4.1 pfc interface 18.4.2 port a control registers h and l (pacrh, pacrl) port a control registers h and l (pacrh, pacrl) are 16-bit readable/writable registers that select the functions of the 16 multiplex pins in port a. pacrh selects the functions of the pins for the upper eight bits of port a, and pacrl selects the functions of the pins for the lower eight bits. pacrh and pacrl are initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. they are not initialized in software standby mode or sleep mode. port a control register h (pacrh) bit: 15 14 13 12 11 10 9 8 ? pa15md ? pa14md ? pa13md ? pa12md initial value:00000000 r/w:rr/wrr/wrr/wrr/w bit:76543210 pa11md1 pa11md0 pa10md1 pa10md0 pa9md1 pa9md0 pa8md1 pa8md0 initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w ? bit 15?reserved: this bit is always read as 0. the write value should always be 0. ? bit 14?pa15 mode bit (pa15md): selects the function of pin pa15/rxd0. bit 14: pa15md description 0 general input/output (pa15) (initial value) 1 receive data input (rxd0)
rev. 3.0, 09/04, page 678 of 1086 ? bit 13?reserved: this bit is always read as 0. the write value should always be 0. ? bit 12?pa14 mode bit (pa14md): selects the function of pin pa14/txd0. bit 12: pa14md description 0 general input/output (pa14) (initial value) 1 transmit data output (txd0) ? bit 11?reserved: this bit is always read as 0. the write value should always be 0. ? bit 10?pa13 mode bit (pa13md): selects the function of pin pa13/tio5b. bit 10: pa13md description 0 general input/output (pa13) (initial value) 1 atu-ii input capture input/output compare output (tio5b) ? bit 9?reserved: this bit is always read as 0. the write value should always be 0. ? bit 8?pa12 mode bit (pa12md): selects the function of pin pa12/tio5a. bit 8: pa12md description 0 general input/output (pa12) (initial value) 1 atu-ii input capture input/output compare output (tio5a) ? bits 7 and 6?pa11 mode bits 1 and 0 (pa11md1 and 0): selects the function of pin pa11/tio4d/adto1b. bit 7: pa11md1 bit 6: pa11md0 description 0 0 general input/output (pa11) (initial value) 0 1 atu-ii input capture input/output compare output (tio4d) 1 0 setting prohibited 1 1 output compare 1b output (mtad) ? bits 5 and 4?pa10 mode bits 1 and 0 (pa10md1 amd 0): selects the function of pin pa10/tio4c/adto1a. bit 5: pa10md1 bit 4: pa10md0 description 0 0 general input/output (pa10) (initial value) 0 1 atu-ii input capture input/output compare output (tio4c) 1 0 setting prohibited 1 1 output compare 1a output (mtad)
rev. 3.0, 09/04, page 679 of 1086 ? bits 3 and 2?pa9 mode bits 1 and 0 (pa9md1 and 0): selects the function of pin pa9/tio4b/adto0b. bit 3: pa9md1 bit 2: pa9md0 description 0 0 general input/output (pa9) (initial value) 0 1 atu-ii input capture input/output compare output (tio4b) 1 0 setting prohibited 1 1 output compare 0b output (mtad) ? bits 1 and 0?pa8 mode bits 1 and 0 (pa8md1 and 0): selects the function of pin pa8/tio4a/adto0a. bit 1: pa8md1 bit 0: pa8md0 description 0 0 general input/output (pa8) (initial value) 0 1 atu-ii input capture input/output compare output (tio4a) 1 0 setting prohibited 1 1 output compare 0a output (mtad) port a control register l (pacrl) bit: 15 14 13 12 11 10 9 8 ? pa7md ? pa6md ? pa5md ? pa4md initial value:00000000 r/w:rr/wrr/wrr/wrr/w bit:76543210 ? pa3md ? pa2md ? pa1md ? pa0md initial value:00000000 r/w:rr/wrr/wrr/wrr/w ? bit 15?reserved: this bit is always read as 0. the write value should always be 0. ? bit 14?pa7 mode bit (pa7md): selects the function of pin pa7/tio3d. bit 14: pa7md description 0 general input/output (pa7) (initial value) 1 atu-ii input capture input/output compare output (tio3d)
rev. 3.0, 09/04, page 680 of 1086 ? bit 13?reserved: this bit is always read as 0. the write value should always be 0. ? bit 12?pa6 mode bit (pa6md): selects the function of pin pa6/tio3c. bit 12: pa6md description 0 general input/output (pa6) (initial value) 1 atu-ii input capture input/output compare output (tio3c) ? bit 11?reserved: this bit is always read as 0. the write value should always be 0. ? bit 10?pa5 mode bit (pa5md): selects the function of pin pa5/tio3b. bit 10: pa5md description 0 general input/output (pa5) (initial value) 1 atu-ii input capture input/output compare output (tio3b) ? bit 9?reserved: this bit is always read as 0. the write value should always be 0. ? bit 8?pa4 mode bit (pa4md): selects the function of pin pa4/tio3a. bit 8: pa4md description 0 general input/output (pa4) (initial value) 1 atu-ii input capture input/output compare output (tio3a) ? bit 7?reserved: this bit is always read as 0. the write value should always be 0. if 1 is written to this bit, correct operation cannot be guaranteed. ? bit 6?pa3 mode bit (pa3md): selects the function of pin pa3/ti0d. bit 6: pa3md description 0 general input/output (pa3) (initial value) 1 atu-ii input capture input (ti0d) ? bit 5?reserved: this bit is always read as 0. the write value should always be 0. if 1 is written to this bit, correct operation cannot be guaranteed. ? bit 4?pa2 mode bit (pa2md): selects the function of pin pa2/ti0c. bit 4: pa2md description 0 general input/output (pa2) (initial value) 1 atu-ii input capture input (ti0c)
rev. 3.0, 09/04, page 681 of 1086 ? bit 3?reserved: this bit is always read as 0. the write value should always be 0. if 1 is written to this bit, correct operation cannot be guaranteed. ? bit 2?pa1 mode bit (pa1md): selects the function of pin pa1/ti0b. bit 2: pa1md description 0 general input/output (pa1) (initial value) 1 atu-ii input capture input (ti0b) ? bit 1?reserved: this bit is always read as 0. the write value should always be 0. if 1 is written to this bit, correct operation cannot be guaranteed. ? bit 0?pa0 mode bit (pa0md): selects the function of pin pa0/ti0a. bit 0: pa0md description 0 general input/output (pa0) (initial value) 1 atu-ii input capture input (ti0a) 18.4.3 i/o port a pa15 (i/o) / rxd0 (input) pa14 (i/o) / txd0 (output) pa13 (i/o) / tio5b (i/o) pa12 (i/o) / tio5a (i/o) pa11 (i/o) / tio4d (i/o) / adto1b (output) pa10 (i/o) / tio4c (i/o) / adto1a (output) pa9 (i/o) / tio4b (i/o) / adto0b (output) pa8 (i/o) / tio4a (i/o) / adto0a (output) pa7 (i/o) / tio3d (i/o) pa6 (i/o) / tio3c (i/o) pa5 (i/o) / tio3b (i/o) pa4 (i/o) / tio3a (i/o) pa3 (i/o) / ti0d (input) pa2 (i/o) / ti0c (input) pa1 (i/o) / ti0b (input) pa0 (i/o) / ti0a (input) port a figure 18.2 port a
rev. 3.0, 09/04, page 682 of 1086 table 18.4 lists the i/o port pins used for the multi-trigger a/d converter. table 18.4 pin function (mtad) type symbol pin no. i/o name function multi-trigger a/d adto0a, adto0b, adto1a, adto1b 135-138 output pwm output pwm output pins. 18.5 operation 18.5.1 overview the multi-trigger a/d converter is divided into the timer parts and a/d conversion parts. the timer parts include two channels 0 and 1, each of which includes the prescaler that can generate or provide the selection of an input clock having the desired frequency. the following are general descriptions of the operations of the channels and prescalers. (1) channels 0 and 1 channels 0 and 1 include 16-bit free running counters (adcnt0 and adcnt1), 16-bit cycle registers (adcylr0 and adcylr1), 16-bit duty registers (addr0a, addr0b, addr1a, and addr1b), and 16-bit general registers (adgr0a, adgr0b, adgr1a, and adgr1b), respectively. they also have external output pins of their own (adto0a, adto0b, adto1a, and adto1b), thus allowing the channels to be used as pwm timers. adcnt0 and adcnt1, which are the incrementing counters, output 0 (1)* to the external output pins when the counter value matches the addr value (when addr adcylr). when the counter value matches the adcylr value (when addr h'0000), adcnt0 and adcnt1 output 1 (0)* to the external output pins, simultaneously clearing the adcnt value to h'0001. due to these operations, channels 0 and 1 can output a waveform having the cycle specified by the adcylr value and the duty specified by the addr value. when addr = adcylr, adcnt0 and adcnt1 output 1 (0)* continuously to the external output pins, thus providing a 100%-duty waveform, and when addr = h'0000, these counters output 0 (1)* continuously to the external output pins, thus providing a 0%-duty waveform. note that the addr value should never be greater than the adcylr value. channels 0 and 1 also perform the compare match operation when the adcnt value matches the adgr0a, adgr0b, adgr1a, or adgr1b value that has been set in adgr previously. however, no output pins are provided. the channels can also trigger multi-trigger a/d conversion using the compare matches. neither adcnt0 nor adcnt1 is cleared when the value matches the adgr0a, adgr0b, adgr1a, or adgr1b value. note: * selected by the a/d trigger control register (adtcr).
rev. 3.0, 09/04, page 683 of 1086 (2) prescalers the channels incorporate dedicated prescalers, which can halt the clock signal that is input from the first stage or divide the frequency of the clock signal by 2, 5, or 10 according to the setting of the a/d trigger control register in the corresponding channels. 18.5.2 pwm operation channels 0 and 1 can be unconditionally used as pwm timers using external output pins (adto0a, adto0b, adto1a, and adto1b). when the prescaler is set using the a/d trigger control register (adtcr) thus starting the free- running counter (adcnt) in channels 0 and 1, the counters increment the count value until the value matches the value in the corresponding cycle register (adcylr). when the adcnt value matches the adcylr value, the adcnt value is cleared to h'0001, thus incrementing again from h'0001. here, the corresponding pins output 1 (0)*. when the appropriate value is set in the duty register (addr) and the adcnt matches the addr value, the corresponding pins output 0 (1)*. when the addr value is h'0000, the output does not change (0% duty). to obtain the 100% duty output, set the same values to the addr and adcylr. note that the addr value should not be greater than the adcylr value. note: * selected by the dtsel0a, dtsel0b, dtsel1a, and dtsel1b bits in the a/d trigger control register (adtcr). 18.5.3 compare match operation the a/d general registers (adgr0a, adgr0b, adgr1a, and adgr1b) in channels 0 and 1 can trigger the corresponding multi-trigger a/d converters. when the a/d trigger control register (adtcr) is set appropriately, the free-running counter (adcnt) starts incrementing the count value. when the adcnt value matches the adgr value that has been set previously, the compare match is generated, requesting the corresponding multi- trigger a/d converter to start. however, no output pins are provided. 18.5.4 multi-trigger a/d conversion operation the multi-trigger a/d conversion is the special conversion mode, in which a/d conversion on the special channnels is performed prior to the other channels during continuous scan mode. when using the multi-trigger a/d conversion operation, only the settings shown below are possible for continuous scan mode; other settings are prohibited.
rev. 3.0, 09/04, page 684 of 1086 channels for conversion (adcsrx) bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 analog input channels adm1 adm0 ch3 ch2 ch1 ch0 a/d0 a/d1 010011an0 to an3 an12 to an15 100011an0 to an7 an12 to an19 010111an4 to an7 an16 to an19 note: x = 0 or 1. be sure to start multi-trigger a/d conversion only while the adcmfxb and adcmfxa bits in the a/d trigger status registers 0 and 1 (adtsr0 and adtsr1) are 0. when the multi-trigger a/d conversion is complete, clear these bits. multi-trigger a/d conversion can be enabled by setting the adtrg in the a/d trigger interrupt enable registers 0 and 1 (adtier0 and adtier1) to 1. multi-trigger a/d conversion starts when the a/d counter (adcnt) value matches the a/d general register (adgr) value during scan mode on the specified channels while the adtrg bit in the a/d trigger interrupt enable register (adtier) is 1. when the a/d conversion on the current channel in continuous scan mode is complete, the multi-trigger a/d conversion on the channels for which the conversion has been requested is performed prior to the other channels. when the multi-trigger a/d conversion on the channels for which the conversion has been requested is complete, the a/d conversion starts again on the channel that has been halted. when the multi-trigger a/d conversion a (an8, an9, an20, and an21) and b (an10, an11, an22, and an23) on the channel for which the conversion has been requested is complete, the results are transferred to the appropriate addr in accordance with the setting of the a/d select bits (adsel) in the a/d trigger control register (adtcr) at the start of the multi-trigger a/d conversion, thus setting the tadfxa and tadfxb bits in adtsr to 1. here, if the tadexa and tadexb bits in adtier are 1, the tadixa and tadixb interrupts are requested. to clear the tadfxa and tadfxb bits to 0, read these bits while they are 1, and write 0 to them. an example of the operation when analog inputs 0 to 7 (an0 to an7) are selected; a/d conversion is performed in 8-channel scan mode; and a/d interrupt conversion is performed is described below. figure 18.4 shows the operation flowchart for the example. 1. 8-channel scan mode is selected (adm1 = 1 and adm0 = 0), continuous scan mode is selected (adcs = 1), analog input channels an0 to an7 are selected (ch3 = 0, ch2 = 0, ch1 = 1, and ch0 = 1), the a/d0 module is enabled for triggering of multi-trigger a/d
rev. 3.0, 09/04, page 685 of 1086 conversion (adtrg = 1), multi-trigger a/d conversion end interrupt is enabled (tadexa and tadexb = 1), and a/d conversion is started. 2. when conversion of the first channel (an0) is completed, the result is transferred to addr0. 3. conversion proceeds in the same way through the eighth channel (an7). 4. when conversion is completed for all the selected channels (an0 to an7), the adf flag is set to 1. if the adie bit is 1 at the completion of conversion, an adi interrupt is requested after a/d conversion ends. 5. if the a/d counter (adcnt) and a/d general register (adgr) values match during conversion of an0 to an7, the multi-trigger a/d conversion on the channels for which the conversion has been requested is started after a/d conversion of the current channel ends. 6. when the multi-trigger a/d conversion on the channels for which the conversion has been requested is completed, the result is transferred to addrx and the a/d data select (adselx) is inverted. if the tadiexa or tadiexb is 1 at the completion of multi-trigger a/d conversion, a tadia or tadib interrupt of the completed channel is requested. 7. after step 6, the a/d conversion starts again on the channel that has been halted. while adst is 1, steps 2 to 7 are repeated. note: when multi-trigger a/d conversion is requested simultaneously from two sources, conversion is performed according to the priority. priority high priority low cmfxa > cmfxb
rev. 3.0, 09/04, page 686 of 1086 idle channel 0 (an0) channel 1 (an1) channel 8 (an8) channel 2 (an2) channel 10 (an10) channel 3 (an3) idle idle idle idle idle a/d conversion (6) a/d conversion (5) a/d conversion (4) a/d conversion (3) a/d conversion (2) a/d conversion (1) idle idle idle idle a/d conversion result (3) a/d conversion result (5) adst adf adcmfxa adcmfxb tadfxa tadfxb clear* clear* clear* clear* addr0 addr1 addr2 addr3 addr8 addr10 note: * instructions executed by software are indicated. a/d conversion result (1) a/d conversion result (2) a/d conversion result (4) figure 18.3 example of multi-trigger a/d converter operation
rev. 3.0, 09/04, page 687 of 1086 multi-trigger a/d conversion mode a/d conversion and multi-trigger a/d conversion are set continuous scan starts a/d conversion on anx is performed data is transferred to addrx adst=1? is multi-trigger a/d conversion requested? a/d conversion on the anx for which the conversion has been requested is performed data is transferred to addrx tadfx is set to 1 a/d conversion ends no ye s ye s ye s no no are adcmfxb and adcmfxa 0? tadfxb, tadfxa, adcmfxb, and adcmfxa flags are cleared figure 18.4 flowchart of multi-trigger a/d converter operation
rev. 3.0, 09/04, page 688 of 1086 18.5.5 interrupts each of channels 0 and 1 generate interrupts from seven sources, that is, a total of 14 sources listed below. module ipr bit vector vector number conditions of interrupt generation multi-trigger a/d conversion ends when the interrupt is enabled by tade0a multi-trigger a/d conversion ends when the interrupt is enabled by tade0b adcnt0 matches adcylr0 when the interrupt is enabled by cye0 adcnt0 matches addr0a when the interrupt is enabled by adde0a adcnt0 matches addr0b when the interrupt is enabled by adde0b adcnt0 matches adgr0a when the interrupt is enabled by adcme0a adt0 iprj (11 to 8) adi0 189 adcnt0 matches adgr0b when the interrupt is enabled by adcme0b module ipr bit vector vector number conditions of interrupt generation multi-trigger a/d conversion ends when the interrupt is enabled by tade1a multi-trigger a/d conversion ends when the interrupt is enabled by tade1b adcnt1 matches adcylr1 when the interrupt is enabled by cye1 adcnt1 matches addr1a when the interrupt is enabled by adde1a adcnt1 matches addr1b when the interrupt is enabled by adde1b adcnt1 matches adgr1a when the interrupt is enabled by adcme1a adt1 iprj (7 to 4) adi1 193 adcnt1 matches adgr1b when the interrupt is enabled by adcme1b
rev. 3.0, 09/04, page 689 of 1086 18.5.6 usage notes 1. when a conflict occurs between a write to adcnt and clearing of the counter by a compare match when a compare match occurs during t2 state of a cpu cycle for writing to adcnt, adcnt is not cleared but is written to. however, a compare match remains effective, thus allowing a write of 1 to the interrupt status flag and external waveform output, similar to regular compare matches. 2. when a conflict occurs between a write to adcnt and incrementing of the counter the counter is not incremented but is written to. 3. when a conflict occurs between clearing of the interrupt status flag and setting of the flag by interrupt generation when any event, such as a compare match and overflow, occurs during t2 state of a cpu cycle for writing 0 to the interrupt status flag, the compare match takes priority thus allowing the interrupt status flag to be set. 4. when reading the continuous scan a/d conversion data during the multi-trigger a/d conversion is performed reading is performed by the dma. following errors are generated according to the interrupt timing. when reading addr of the first channel by the continuous scan interrupt, if mtad is executed on the last channel in the previous scan, the data may be overwritten again in this scan because the first channel is converted. 18.5.7 operation waveform examples (a) hardware operation 1. a compare match occurs, setting the status flag to the corresponding source. 2. multi-trigger a/d conversion that is enabled by a/d trigger (adtrg) in the a/d trigger interrupt enable register (adtier) starts. after multi-trigger a/d conversion is over 3. multi-trigger a/d conversion result is transferred to the register that is specified by a/d select (adsel) in the a/d trigger control register (adtcr) at the start of the conversion. 4. an interrupt is generated if the multi-trigger a/d conversion end interrupt is enabled.
rev. 3.0, 09/04, page 690 of 1086 software operation 1. a compare match flag is cleared. 2. the value in the a/d general register (adgr) is changed. 3. a/d select (adsel) in the a/d trigger control register (adtcr) is changed. after multi-trigger a/d conversion is over 4. the multi-trigger a/d conversion end flag is cleared. 5. the conversion result is read out. (b) hardware operation 1. a compare match occurs, setting the status flag to the corresponding source. 2. an interrupt is generated if the a/d duty enable bit (adde) in the a/d trigger interrupt enable register (adtier) is set. 3. the level of the external output pin is changed. software operation 1. the duty compare match flag is cleared. (c) hardware operation 1. a compare match occurs, setting the status flag to the corresponding source. 2. an interrupt is generated if the a/d cycle enable bit (adcylr) in the a/d trigger interrupt enable register (adtier) is set. 3. the level of the external output pin is changed. software operation 1. the cycle compare match flag is cleared. 2. the values in the a/d duty register (addr) and the a/d cycle register (adcylr) are changed.
rev. 3.0, 09/04, page 691 of 1086 dtselxa, dtselxb=0 (on-duty output is selected for pwm.) adcylrx adgrxa adgrxb addrxa addrxb adgrxb adgrxa adtoxa (a) (a) (a) ( a) (a) (a) (b) (b) (c) adtoxb note: x = 0 or 1 figure 18.5 example of output waveform from mtad pwm
rev. 3.0, 09/04, page 692 of 1086 18.6 appendices 18.6.1 on-chip peripheral module registers (1) address on-chip peripheral module register addresses and bit names related to the multi-trigger a/d are shown in table 18.5. 16-bit and 32-bit registers are shown in two and four rows of 8 bits, respectively. table 18.5 address register bit names address abbr. bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'fffff720 pa15ior pa14ior pa13ior pa12ior pa11ior pa10ior pa9ior pa8ior h'fffff721 paior pa7ior pa6ior pa5ior pa4ior pa3ior pa2ior pa1ior pa0ior h'fffff722 ? pa15md ? pa14md ? pa13md ? pa12md h'fffff723 pacrh pm11md1 pa11md0 pm10md1 pa10md0 pm9md1 pa9md0 pm8md1 pa8md0 h'fffff724 ? pa7md ? pa6md ? pa5md ? pa4md h'fffff725 pacrl ? pa3md ? pa2md ? pa1md ? pa0md h'fffff726 pa15dr pa14dr pa13dr pa12dr pa11dr pa10dr pa9dr pa8dr h'fffff727 padr pa7dr pa6dr pa5dr pa4dr pa3dr pa2dr pa1dr pa0dr port a (2) register states in reset and power-down states table 18.6 register states in reset and power-down states reset state power-down state type name power-on hardware standby software standby sleep adtcr0, adtcr1 adtsr0, adtsr1 adtier0, adtier1 adcnt0, adcnt1 adgr0a, adgr0b adgr1a, adgr1b adcylr0, adcylr1 addr0a, addr0b multi-trigger a/d (mtad) addr1a, addr1b initialized initialized initialized held
rev. 3.0, 09/04, page 693 of 1086 18.6.2 pin states table 18.7 pin states pin state reset state power-down state power-on type pin name romless expanded mode 8 bits 16 bits expanded mode with rom single- chip mode hardware standby software standby h-udi module standby aud module standby bus- released state adto0a ? z o * ooo adto0b ? z o * ooo adto1a ? z o * ooo mtad adto1b ? z o * ooo ? : not initial value i : input o : output h : high-level output l : low-level output z : high impedance k : input pins become high-impedance, output pins retain their state. notes: when the ckhiz bit in pfcrh is set to 1, becomes high-impedance unconditionally. * when the port impedance bit (hiz) in the standby control register (sbycr) is set to 1, output pins become high-impedance. 18.6.3 ac characteristics table 18.8 output timing of adto0a, adto0b, adto1a, and adto1b item symbol min. max. unit figures t lh ? 100 ns figure 18.6 delay time t hl ? 100 ns figure 18.6 ck t lh t hl adto0a adto0b adto1a adto1b figure 18.6 output timing of adto0a, adto0b, adto1a, and adto1b
rev. 3.0, 09/04, page 694 of 1086
rev. 3.0, 09/04, page 695 of 1086 section 19 high-performance user debug interface (h-udi) 19.1 overview the high-performance user debug interface (h-udi) provides data transfer, interrupt request, and boundary scan functions. the h-udi performs serial transfer by means of external signal control. 19.1.1 features the h-udi has the following features conforming to the ieee 1149.1 standard. ? five test signals (tck, tdi, tdo, tms, and trst ) ? tap controller ? instruction register ? data register ? bypass register ? boundary scan register the h-udi has seven instructions. ? bypass mode test mode conforming to ieee 1149.1 ? extest mode test mode conforming to ieee1149.1. ? sample/preload mode test mode conforming to ieee1149.1. ? clamp mode test mode conforming to ieee1149.1. ? highz mode test mode conforming to ieee1149.1. ? idcode mode test mode conforming to ieee1149.1. ? h-udi interrupt h-udi interrupt request to intc
rev. 3.0, 09/04, page 696 of 1086 19.1.2 h-udi block diagram figure 19.1 shows a block diagram of the h-udi. tck tms tdi tap controller internal bus controller h-udi interrupt signal sdsr sdidr sddrh sddrl shift register sdbpr mux tdo peripheral bus sdir: instruction register tck: test clock sdsr: status register tms: test mode select sddrh: data register h : test reset sddrl: data register l tdi: test data input sdbpr: bypass register tdo: test data output sdbsr: boundary scan register sdidr: id code register decoder 16 sdir sdbsr figure 19.1 h-udi block diagram
rev. 3.0, 09/04, page 697 of 1086 19.1.3 pin configuration table 19.1 shows the h-udi pin configuration. table 19.1 pin configuration pin name abbreviation i/o function test clock tck input test clock input test mode select tms input test mode select input signal test data input tdi input serial data input test data output tdo output serial data output test reset trst input test reset input signal 19.1.4 register configuration table 19.2 shows the h-udi registers. table 19.2 register configuration register abbreviation r/w * 1 initial value * 2 address access size (bits) instruction register sdir r h'e000 h'fffff7c0 8/16/32 status register sdsr r/w h'0b01 h'fffff7c2 8/16/32 data register h sddrh r/w undefined h'fffff7c4 8/16/32 data register l sddrl r/w undefined h'fffff7c6 8/16/32 bypass register sdbpr ? ? ? ? boundary scan register sdbsr ? ? ? ? id code register sdidr ? h'001d200f ? ? notes: 1. indicates whether the register can be read from/written to by the cpu. 2. initial value when the trst signal is input. registers are not initialized by a reset (power-on or manual) or in standby mode. instructions and data can be input to the instruction register (sdir) and data register (sddr) by serial transfer from the test data input pin (tdi). data from sdir, the status register (sdsr), and sddr can be output via the test data output pin (tdo). the bypass register (sdbpr) is a 1-bit register to which tdi and tdo are connected in bypass, clamp, or highz mode. the boundary scan register (sdbsr) is a 474-bit register, and is connected to tdi and tdo in the sample/preload or extest mode. the id code register (sdidr) is a 32-bit register; a fixed code can be output via tdo in the idcode mode. all registers, except sdbpr, sdbsr, and sdidr, can be accessed from the cpu.
rev. 3.0, 09/04, page 698 of 1086 table 19.3 shows the kinds of serial transfer possible with each register. table 19.3 h-udi register serial transfer register serial input serial output sdir possible possible sdsr impossible possible sddrh possible possible sddrl possible possible sdbpr possible possible sdbsr possible possible sdidr impossible possible 19.2 external signals 19.2.1 test clock (tck) the test clock pin (tck) provides an independent clock supply to the h-udi. as the clock input to tck is supplied directly to the h-udi, a clock waveform with a duty cycle close to 50% should be input (for details, see section 27, electrical characteristics). if no signal is input, tck is fixed at 1 by internal pull-up. 19.2.2 test mode select (tms) the test mode select pin (tms) is sampled at the rise of tck. tms controls the internal state of the tap controller. if no signal is input, tms is fixed at 1 by internal pull-up. 19.2.3 test data input (tdi) the test data input pin (tdi) performs serial input of instructions and data for h-udi registers. tdi is sampled at the rise of tck. if no signal is input, tdi is fixed at 1 by internal pull-up. 19.2.4 test data output (tdo) the test data output pin (tdo) performs serial output of instructions and data from h-udi registers. transfer is performed in synchronization with tck. if there is no output, tdo goes to the high-impedance state.
rev. 3.0, 09/04, page 699 of 1086 19.2.5 test reset ( trst trst trst trst ) the test reset pin ( trst ) initializes the h-udi asynchronously. if no signal is input, trst is fixed at 1 by internal pull-up. 19.3 register descriptions 19.3.1 instruction register (sdir) bit: 15 14 13 12 11 10 9 8 ts3ts2ts1ts0???? initial value:11100000 r/w:rrrrrrrr bit:76543210 ???????? initial value:00000000 r/w:rrrrrrrr the instruction register (sdir) is a 16-bit register that can only be read by the cpu. h-udi instructions can be transferred to sdir by serial input from tdi. sdir can be initialized by the trst signal, but is not initialized by a reset or in software standby mode. sdir defines four valid bits for instruction. if an instruction exceeding four bits is input, the last four bits of the serial data will be stored in sdir. operation is not guaranteed if a reserved instruction is set in this register. bits 15 to 12?test set bits (ts3?ts0): table 19.4 shows the instruction configuration.
rev. 3.0, 09/04, page 700 of 1086 table 19.4 instruction configuration bit 15: ts3 bit 14: ts2 bit 13: ts1 bit 12: ts0 description 0 extest mode 0 1 reserved 0 clamp mode 0 1 1 highz mode 0 sample/preload mode 0 1 reserved 0 reserved 0 1 1 1 reserved 0 reserved 0 1 reserved 0 h-udi interrupt 0 1 1 reserved 0 reserved 0 1 reserved 0 idcode mode (initial value) 1 1 1 1 bypass mode bits 11 to 0?reserved: these bits are always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 701 of 1086 19.3.2 status register (sdsr) bit: 15 14 13 12 11 10 9 8 ???????? initial value:00001011 r/w:rrrrrrrr bit:76543210 ???????sdtrf initial value:00000001 r/w:rrrrrrrr/w the status register (sdsr) is a 16-bit register that can be read from and written to by the cpu. sdsr output from tdo is possible, but serial data cannot be written to sdsr via tdi. the sdtrf bit is output by means of a 1-bit shift. in the case of a 2-bit shift, the sdtrf bit is first output, followed by a reserved bit. sdsr is initialized by trst signal input, but is not initialized by a reset or in software standby mode. bits 15 to 1?reserved: bits 15 to 12 and 7 to 1 are always read as 0, and the write value should always be 0. bit 11, 9, and 8 are always read as 1, and the write value should always be 1. bit 0?serial data transfer control flag (sdtrf): indicates whether h-udi registers can be accessed by the cpu. the sdtrf bit is reset by the trst signal , but is not initialized by a reset or in software standby mode. bit 0: sdtrf description 0 serial transfer to sddr has ended, and sddr can be accessed 1 serial transfer to sddr in progress (initial value)
rev. 3.0, 09/04, page 702 of 1086 19.3.3 data register (sddr) the data register (sddr) comprises data register h (sddrh) and data register l (sddrl), each of which has the following configuration. bit: 15 14 13 12 11 10 9 8 initial value:???????? r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit:76543210 initial value:???????? r/w: r/w r/w r/w r/w r/w r/w r/w r/w sddrh and sddrl are 16-bit registers that can be read from and written to by the cpu. sddr is connected to tdo and tdi for serial data transfer to and from an external device. 32-bit data is input and output in serial data transfer. if data exceeding 32 bits is input, only the last 32 bits will be stored in sddr. serial data is input starting from the msb of sddr (bit 15 of sddrh), and output starting from the lsb (bit 0 of sddrl). this register is not initialized by a reset, in hardware or software standby mode, or by the trst signal. 19.3.4 bypass register (sdbpr) the bypass register (sdbpr) is a 1-bit shift register. in bypass, clamp, or highz mode, sdbpr is connected between tdi and tdo. sdbpr cannot be read or written to by the cpu. 19.3.5 boundary scan register (sdbsr) the boundary scan register (sdbsr), a shift register that controls the i/o pins of this lsi, is provided on the pad. using the extest mode or the sample/preload mode, a boundary scan test conforming to the ieee1149.1 standard can be performed. for sdbsr, read/write by the cpu cannot be performed. table 19.5 shows the relationship between the pins of the lsi and the boundary scan register.
rev. 3.0, 09/04, page 703 of 1086 table 19.5 correspondence between pins and boundary scan register bits pin no. pin name input/output bit no. from tdi 238 audrst input 473 240 audmd input 472 input 471 output 470 241 audata0 output enable 469 input 468 output 467 242 audata1 output enable 466 input 465 output 464 243 audata2 output enable 463 input 462 output 461 244 audata3 output enable 460 input 459 output 458 245 audck output enable 457 input 456 output 455 246 audsync output enable 454 input 453 output 452 248 pd0/top1a output enable 451 input 450 output 449 250 pd1/tio1b output enable 448 input 447 output 446 251 pd2/tio1c output enable 445
rev. 3.0, 09/04, page 704 of 1086 table 19.5 correspondence between pins and boundary scan register bits (cont) pin no. pin name input/output bit no. input 444 output 443 252 pd3/tio1d output enable 442 input 441 output 440 253 pd4/tio1e output enable 439 input 438 output 437 254 pd5/tio1f output enable 436 input 435 output 434 255 pd6/tio1g output enable 433 input 432 output 431 256 pd4/tio1h output enable 430 input 429 output 428 1 pd8/puls0 output enable 427 input 426 output 425 2 pd9/puls1 output enable 424 input 423 output 422 3 pd10/puls2 output enable 421 input 420 output 419 4 pd11/puls3 output enable 418 input 417 output 416 5 pd12/puls4 output enable 415
rev. 3.0, 09/04, page 705 of 1086 table 19.5 correspondence between pins and boundary scan register bits (cont) pin no. pin name input/output bit no. input 414 output 413 6 pd13/puls6/ htxd0/htxd1 output enable 412 input 411 output 410 7 pe0/a0 output enable 409 input 408 output 407 8 pe1/a1 output enable 406 input 405 output 404 9 pe2/a2 output enable 403 input 402 output 401 10 pe3/a3 output enable 400 input 399 output 398 12 pe4/a4 output enable 397 input 396 output 395 14 pe5/a5 output enable 394 input 393 output 392 15 pe6/a6 output enable 391 input 390 output 389 16 pe4/a7 output enable 388 input 387 output 386 17 pe8/a8 output enable 385
rev. 3.0, 09/04, page 706 of 1086 table 19.5 correspondence between pins and boundary scan register bits (cont) pin no. pin name input/output bit no. input 384 output 383 18 pe9/a9 output enable 382 input 381 output 380 19 pe10/a10 output enable 379 input 378 output 377 21 pe11/a11 output enable 376 input 375 output 374 23 pe12/a12 output enable 373 input 372 output 371 24 pe13/a13 output enable 370 input 369 output 368 25 pe14/a14 output enable 367 input 366 output 365 26 pe15/a15 output enable 364 input 363 output 362 27 pf0/a16 output enable 361 input 360 output 359 28 pf1/a17 output enable 358 input 357 output 356 29 pf2/a18 output enable 355
rev. 3.0, 09/04, page 707 of 1086 table 19.5 correspondence between pins and boundary scan register bits (cont) pin no. pin name input/output bit no. input 354 output 353 31 pf3/a19 output enable 352 input 351 output 350 33 pf4/a20 output enable 349 input 348 output 347 34 pf5/a21/ pod output enable 346 input 345 output 344 35 pf6/ wrl output enable 343 input 342 output 341 36 pf7/ wrh output enable 340 input 339 output 338 37 pf8/ wait output enable 337 input 336 output 335 38 pf9/ rd output enable 334 input 333 output 332 40 pf10/ cs0 output enable 331 input 330 output 329 42 pf1/ cs1 output enable 328 input 327 output 326 43 pf12/ cs2 output enable 325
rev. 3.0, 09/04, page 708 of 1086 table 19.5 correspondence between pins and boundary scan register bits (cont) pin no. pin name input/output bit no. input 324 output 323 44 pf13/ cs3 output enable 322 input 321 output 320 45 pf14/ back output enable 319 input 318 output 317 46 pf15/ breq output enable 316 50 md2 input 315 55 md1 input 314 56 fwe input 313 59 md0 input 312 input 311 output 310 63 ph0/d0 output enable 309 input 308 output 307 64 ph1/d1 output enable 306 input 305 output 304 65 ph2/d2 output enable 303 input 302 output 301 66 ph3/d3 output enable 300 input 299 output 298 67 ph4/d4 output enable 297 input 296 output 295 68 ph5/d5 output enable 294
rev. 3.0, 09/04, page 709 of 1086 table 19.5 correspondence between pins and boundary scan register bits (cont) pin no. pin name input/output bit no. input 293 output 292 69 ph6/d6 output enable 291 input 290 output 289 71 ph7/d7 output enable 288 input 287 output2 286 73 ph8/d8 output enable 285 input 284 output 283 74 ph9/d9 output enable 282 input 281 output 280 76 ph10/d10 output enable 279 input 278 output 277 78 ph11/d11 output enable 276 input 275 output 274 79 ph12/d12 output enable 273 input 272 output 271 80 ph13/d13 output enable 270 input 269 output 268 81 ph14/d14 output enable 267 input 266 output 265 82 ph15/d15 output enable 264
rev. 3.0, 09/04, page 710 of 1086 table 19.5 correspondence between pins and boundary scan register bits (cont) pin no. pin name input/output bit no. 84 nmi input 263 output 262 124 wdtovf output enable 261 input 260 output 259 125 pa0/ti0a output enable 258 input 257 output 256 127 pa1/ti0b output enable 255 input 254 output 253 129 pa2/ti0c output enable 252 input 251 output 250 130 pa3/ti0d output enable 249 input 248 output 247 131 pa4/tio3a output enable 246 input 245 output 244 132 pa5/tio3b output enable 243 input 242 output 241 133 pa6/tio3c output enable 240 input 239 output 238 134 pa7/tio3d output enable 237 input 236 output 235 135 pa8/tiio4a output enable 234
rev. 3.0, 09/04, page 711 of 1086 table 19.5 correspondence between pins and boundary scan register bits (cont) pin no. pin name input/output bit no. input 233 output 232 136 pa9/tio4b output enable 231 input 230 output 229 137 pa10/tio4c output enable 228 input 227 output 226 138 pa11/tio4d output enable 225 input 224 output 223 140 pa12/tio5a output enable 222 input 221 output 220 142 pa13/tio5b output enable 219 input 218 output 217 143 pa14/txd0 output enable 216 input 215 output 214 144 pa15/rxd0 output enable 213 input 212 output 211 145 pb0/to6a output enable 210 input 209 output 208 146 pb1/to6b output enable 207 input 206 output 205 147 pb2/to6c output enable 204
rev. 3.0, 09/04, page 712 of 1086 table 19.5 correspondence between pins and boundary scan register bits (cont) pin no. pin name input/output bit no. input 203 output 202 149 pb3/to6d output enable 201 input 200 output 199 151 pb4/to7a/to8a output enable 198 input 197 output 196 152 pb5/to7b/to8b output enable 195 input 194 output 193 153 pb6/to7c/to8c output enable 192 input 191 output 190 154 pb7/to7d/to8d output enable 189 input 188 output 187 155 pd8/txd3/to8e output enable 186 input 185 output 184 156 pb9/rxd3/to8f output enable 183 input 182 output 181 157 pb10/txd4/htxd0 /to8g output enable 180 input 179 output 178 158 pb11/rxd4/hrxd0 /to8h output enable 177 input 176 output 175 159 pb12/tclka / ubctrg output enable 174
rev. 3.0, 09/04, page 713 of 1086 table 19.5 correspondence between pins and boundary scan register bits (cont) pin no. pin name input/output bit no. input 173 output 172 160 pb13/sck0 output enable 171 input 170 output 169 162 pb14/sck1/ tclkb/ti10 output enable 168 input 167 output 166 164 pb15/puls5/ sck2 output enable 165 input 164 output 163 165 pc0/txd1 output enable 162 input 161 output 160 166 pc1/rxd1 output enable 159 input 158 output 157 167 pc2/txd2 output enable 156 input 155 output 154 168 pc3/rxd2 output enable 153 input 152 output 151 169 pc4/ irq0 output enable 150 input 149 output 148 170 pg0/puls7/ hrxd0/hrxd1 output enable 147 input 146 output 145 171 pg1/ irq1 output enable 144
rev. 3.0, 09/04, page 714 of 1086 table 19.5 correspondence between pins and boundary scan register bits (cont) pin no. pin name input/output bit no. input 143 output 142 173 pg2/ irq2 /adend output enable 141 input 140 output 139 175 pg3/ irq3 / adtrg0 output enable 138 input 137 output 136 176 pj0/tio2a output enable 135 input 134 output 133 177 pj1/tio2b output enable 132 input 131 output 130 178 pj2/tio2c output enable 129 input 128 output 127 179 pj3/tio2d output enable 126 input 125 output 124 180 pj4/tio2e output enable 123 input 122 output 121 181 pj5/tio2f output enable 120 input 119 output 118 182 pj6/tio2g output enable 117 input 116 output 115 183 pj7/tio2h output enable 114
rev. 3.0, 09/04, page 715 of 1086 table 19.5 correspondence between pins and boundary scan register bits (cont) pin no. pin name input/output bit no. input 113 output 112 184 pj8/tio5c output enable 111 input 110 output 109 186 pj9/tio5d output enable 108 input 107 output 106 188 pj10/ti9a output enable 105 input 104 output 103 189 pj11/ti9b output enable 102 input 101 output 100 190 pj12/ti9c output enable 99 input 98 output 97 191 pj13/ti9d output enable 96 input 95 output 94 192 pj14/ti9e output enable 93 input 92 output 91 193 pj15/ti9f output enable 90 input 89 output 88 195 pk0/to8a output enable 87 input 86 output 85 197 pk1/to8b output enable 84
rev. 3.0, 09/04, page 716 of 1086 table 19.5 correspondence between pins and boundary scan register bits (cont) pin no. pin name input/output bit no. input 83 output 82 198 pk2/to8c output enable 81 input 80 output 79 199 pk3/to8d output enable 78 input 77 output 76 200 pk4/to8e output enable 75 input 74 output 73 201 pk5/to8f output enable 72 input 71 output 70 202 pk6/to8g output enable 69 input 68 output 67 204 pk7/to8h output enable 66 input 65 output 64 206 pk8/to8i output enable 63 input 62 output 61 207 pk9/to8j output enable 60 input 59 output 58 208 pk10/to8k output enable 57 input 56 output 55 209 pk11/to8l output enable 54
rev. 3.0, 09/04, page 717 of 1086 table 19.5 correspondence between pins and boundary scan register bits (cont) pin no. pin name input/output bit no. input 53 output 52 210 pk12/to8m output enable 51 input 50 output 49 211 pk13/to8n output enable 48 input 47 output 46 213 pk14/to8o output enable 45 input 44 output 43 215 pk15/to8p output enable 42 input 41 output 40 216 pl0/ti10 output enable 39 input 38 output 37 217 pl1/tio11a/ irq6 output enable 36 input 35 output 34 218 pl2/tio11b/ irq7 output enable 33 input 32 output 31 219 pl3/tclkb output enable 30 input 29 output 28 220 pl4/ adtrg0 output enable 27 input 26 output 25 221 pl5/ adtrg1 output enable 24
rev. 3.0, 09/04, page 718 of 1086 table 19.5 correspondence between pins and boundary scan register bits (cont) pin no. pin name input/output bit no. input 23 output 22 222 pl6/adend output enable 21 input 20 output 19 223 pl7/sck2 output enable 18 input 17 output 16 224 pl8/sck3 output enable 15 input 14 output 13 226 pl9/scl4/ irq5 output enable 12 input 11 output 10 228 pl10/htxd0/ htxd1/htxd0& htxd1 output enable 9 input 8 output 7 229 pl11/hrxd0/ hrxd1/hrxd0& hrxd1 output enable 6 input 5 output 4 230 pl12/ irq4 output enable 3 input 2 output 1 231 pl13/ irqout output enable 0 to tdo
rev. 3.0, 09/04, page 719 of 1086 19.3.6 id code register (sdidr) the id code register (sdidr) is a 32-bit register. in the idcode mode, sdidr can output h'001d200f, which is a fixed code, from tdo. however, no serial data can be written to sdidr via tdi. for sdidr, read/write by the cpu cannot be performed. 31 28 27 12 11 1 0 0000 0001 0001 1101 0010 0000 0000 111 1 version (4 bits) part number (16 bits) manufacture identify (11 bits) fixed code (1 bit)
rev. 3.0, 09/04, page 720 of 1086 19.4 operation 19.4.1 tap controller figure 18.2 shows the internal states of the tap controller. state transitions basically conform with the ieee1149.1 standard. test-logic-reset capture-dr shift-dr exit1-dr pause-dr exit2-dr update-dr select-dr-scan run-test/idle 1 0 0 0 0 11 1 11 1 0 0 1 0 1 1 10 capture-ir shift-ir exit1-ir pause-ir exit2-ir update-ir select-ir-scan 0 0 1 0 0 1 0 1 1 10 0 figure 19.2 tap controller state transitions
rev. 3.0, 09/04, page 721 of 1086 19.4.2 h-udi interrupt and serial transfer when an h-udi interrupt instruction is transferred to sdir via tdi, an interrupt is generated. data transfer can be controlled by means of the h-udi interrupt service routine. transfer can be performed by means of sddr. control of data input/output between an external device and the h-udi is performed by monitoring the sdtrf bit in sdsr externally and internally. internal sdtrf bit monitoring is carried out by having sdsr read by the cpu. the h-udi interrupt and serial transfer procedure is as follows. 1. an instruction is input to sdir by serial transfer, and an h-udi interrupt request is generated. 2. after the h-udi interrupt request is issued, the sdtrf bit in sdsr is monitored externally. after output of sdtrf = 1 from tdo is observed, serial data is transferred to sddr. 3. on completion of the serial transfer to sddr, the sdtrf bit is cleared to 0, and sddr can be accessed by the cpu. after sddr has been accessed, sddr serial transfer is enabled by setting the sdtrf bit to 1 in sdsr. 4. serial data transfer between an external device and the h-udi can be carried out by constantly monitoring the sdtrf bit in sdsr externally and internally. figures 19.3, 19.4, and 19.5 show the timing of data transfer between an external device and the h-udi.
rev. 3.0, 09/04, page 722 of 1086 sdtrf 10 1 sdsr sddr sdsr sddr shift cpu shift cpu input/ output serial data h-udi interrupt request sdtrf (in sdsr) * 1 sdsr and sddr mux * 2 sddr access state instruction input shift disabled shift enabled sdsr serial transfer (monitoring) shift enabled notes: 1. sdtrf flag (in sdsr): indicates whether sddr access by the cpu or serial transfer data input/output to sddr is possible. 1 sddr is shift-disabled. sddr access by the cpu is enabled. 2 sddr is shift-enabled. do not access sddr until sdtrf = 0. conditions:  sdtrf = 1 ? when trst = 0 ? when the cpu writes 1 ? in bypass mode  sdtrf = 0 ? end of sddr shift access in serial transfer 2. sdsr/sddr (update-dr state) internal mux switchover timing  switchover from sdsr to sddr: on completion of serial transfer in which sdtrf = 1 is output from tdo  switchover from sddr to sdsr: on completion of serial transfer to sddr figure 19.3 data input/output timing chart (1)
rev. 3.0, 09/04, page 723 of 1086 tck tms tdi tdo test-logic-reset run-test/idle select-dr select-ir capture-ir shift-ir update-ir select-dr capture-dr shift-dr test-logic-reset run-test/idle exit1-dr update-dr ts0 ts3 exit1-ir sdtrf figure 19.4 data input/output timing chart (2) tck tms tdi tdo select-dr select-dr capture-dr shift-dr exit1-dr update-dr select-dr capture-dr shift-dr update-dr bit 0 bit 31 bit 0 bit 31 bit 0 bit 31 bit 0 bit 31 sdtrf sdtrf shift-dr capture-dr shift-dr select-dr update-dr capture-dr update-dr exit1-dr exit1-dr exit1-dr figure 19.5 data input/output timing chart (3)
rev. 3.0, 09/04, page 724 of 1086 19.4.3 h-udi reset the h-udi can be reset in the following cases. ? when the trst signal is held at 0. ? when trst = 1 and at least five tck clock cycles are input while tms = 1. ? when the mstop2 bit in syscr2 is set to 1 (see section 25.2.3). ? in hardware standby mode. 19.5 boundary scan the h-udi pins can be placed in the boundary scan mode stipulated by ieee1149.1 by setting a command in sdir. 19.5.1 supported instructions the sh7058 supports the three essential instructions defined in ieee1149.1 (bypass, sample/preload, and extest) and optional instructions (clamp, highz, and idcode). bypass: the bypass instruction is an essential standard instruction that operates the bypass register. this instruction shortens the shift path to speed up serial data transfer involving other chips on the printed circuit board. while this instruction is executing, the test circuit has no effect on the system circuits. the instruction code is 1111. sample/preload: the sample/preload instruction inputs values from the sh7058 ? s internal circuitry to the boundary scan register, outputs values from the scan path, and loads data onto the scan path. when this instruction is executing, the sh7058 ? s input pin signals are transmitted directly to the internal circuitry, and internal circuit values are directly output externally from the output pins. the sh7058 ? s system circuits are not affected by execution of this instruction. the instruction code is 0100. in a sample operation, a snapshot of a value to be transferred from an input pin to the internal circuitry, or a value to be transferred from the internal circuitry to an output pin, is latched into the boundary scan register and read from the scan path. snapshot latching does not affect normal operation of the sh7058. in a preload operation, an initial value is set in the parallel output latch of the boundary scan register from the scan path prior to the extest instruction. without a preload operation, when the extest instruction was executed an undefined value would be output from the output pin until completion of the initial scan sequence (transfer to the output latch) (with the extest instruction, the parallel output latch value is constantly output to the output pin). extest: this instruction is provided to test external circuitry when the sh7058 is mounted on a printed circuit board. when this instruction is executed, output pins are used to output test data
rev. 3.0, 09/04, page 725 of 1086 (previously set by the sample/preload instruction) from the boundary scan register to the printed circuit board, and input pins are used to latch test results into the boundary scan register from the printed circuit board. if testing is carried out by using the extest instruction n times, the nth test data is scanned-in when test data (n-1) is scanned out. data loaded into the output pin boundary scan register in the capture-dr state is not used for external circuit testing (it is replaced by a shift operation). the instruction code is 0000. clamp: when the clamp instruction is enabled, the output pin outputs the value of the boundary scan register that has been set by the sample/preload instruction. while the clamp instruction is enabled, the state of the boundary scan register maintains the previous state regardless of the state of the tap controller. a bypass register is connected between tdi and tdo. the related circuit operates in the same way when the bypass instruction is enabled. the instruction code is 0010. highz: when the highz instruction is enabled, all output pins enter a high-impedance state. while the highz instruction is enabled, the state of the boundary scan register maintains the previous state regardless of the state of the tap controller. a bypass register is connected between tdi and tdo. the related circuit operates in the same way when the bypass instruction is enabled. the instruction code is 0011. idcode: when the idcode instruction is enabled, the value of the id code register is output from tdo with lsb first when the tap controller is in the shift-dr state. while this instruction is being executed, the test circuit does not affect the system circuit. when the tap controller is in the test-logic-reset state, the instruction register is initialized to the idcode instruction. the instruction code is 1110. 19.5.2 notes on use 1. boundary scan mode does not cover clock-related signals (extal, xtal, ck, pllcap). 2. boundary scan mode does not cover reset-related signals ( res , hstby ). 3. boundary scan mode does not cover h-udi-related signals (tck, tdi, tdo, tms, trst ). 4. boundary scan mode does not cover a/d-converter-related signals (ad0 to an31).
rev. 3.0, 09/04, page 726 of 1086 19.6 usage notes ? a reset must always be executed by driving the trst signal to 0, regardless of whether or not the h-udi is to be activated. trst must be held low for 20 tck clock cycles. for details, see section 27, electrical characteristics. ? the registers are not initialized in software standby mode. if trst is set to 0 in software standby mode, idcode mode will be entered. ? the frequency of tck must be lower than that of the peripheral module clock (p ). for details, see section 27, electrical characteristics. ? in serial data transfer, data input/output starts with the lsb. figure 18.6 shows serial data input/output. ? when data that exceeds the number of bits of the register connected between tdi and tdo is serially transferred, the serial data that exceeds the number of register bits and output from tdo is the same as that input from tdi. ? if the h-udi serial transfer sequence is disrupted, a trst reset must be executed. transfer should then be retried, regardless of the transfer operation. ? tdo is output at the falling edge of tck when one of six instructions defined in ieee1149.1 is selected. otherwise, it is output at the rising edge of tck. tdi sdir sdsr sdir sdsr sdir sdsr tdo shift register bit 31 bit 15 bit 16 bit 0 bit 15 bit 15 bit 0 bit 0  sdir and sdsr serial data input/output in capture-ir, sdir and sdsr are captured into the shift register, and in shift-ir bits 0 to 15 of sdsr and bits 0 to 15 of sdir are output in that order from tdo. in update-ir, data input from tdi is written to sdir, but not to sdsr. . . . . . . capture-ir tdi tdi input data tdo shift register bit 31 bit 15 bit 16 bit 0 bit 15 bit 0 . . . update-ir figure 19.6 serial data input/output (1)
rev. 3.0, 09/04, page 727 of 1086 tdi sddrh sddrl sddrh sddrl tdo shift register bit 31 bit 15 bit 16 bit 0 bit 15 bit 15 bit 0 bit 0 bit 15 bit 15 bit 0 bit 0 . . . . . . . . . capture-dr tdi sddrh sddrl tdo shift register bit 31 bit 15 bit 16 bit 0 . . . update-dr tdi sdir sdsr sdir sdsr tdo shift register bit 31 bit 15 bit 16 bit 0 bit 15 bit 15 bit 0 bit 0  sddrh and sddrl serial data input/output (1) in h-udi interrupt mode, before sdtrf = 1 is read from tdo when an h-udi interrupt is generated, sdsr and sdir are captured into the shift register in capture-dr, and in shift-dr bits 0 to 15 of sdsr and bits 0 to 15 of sdir are output in that order from tdo. in update-dr, tdi input data is not written to any register. (2) in h-udi interrupt mode, after sdtrf = 1 is read from tdo when an h-udi interrupt is generated, sddrh and sddrl are captured into the shift register in capture-dr, and in shift-dr bits 0 to 15 of sddrl and bits 0 to 15 of sddrh are output in that order from tdo. data input from tdi is written to sddrh and sddrl in update-dr. . . . . . . capture-dr tdi input data figure 19.6 serial data input/output (2)
rev. 3.0, 09/04, page 728 of 1086  sdidr serial data input/output in idcode mode, sdidr is captured into the shift register in capture-dr, and in shift-dr bits 0 to 31 of sdidr are output in that order from tdo. in update-dr, data input from tdi is not written to any register. tdi sdidr sdidr tdo shift register bit 31 bit 31 bit 0 bit 0 . . . . capture-dr figure 19.6 serial data input/output (3)
rev. 3.0, 09/04, page 729 of 1086 section 20 advanced user debugger (aud) 20.1 overview the sh7058 has an on-chip advanced user debugger (aud). use of the aud simplifies the construction of a simple emulator, with functions such as acquisition of branch trace data and monitoring/tuning of on-chip ram data. 20.1.1 features the aud has the following features: ? eight input/output pins ? data bus (audata3?audata0) ? aud reset ( audrst ) ? aud sync signal ( audsync ) ? aud clock (audck) ? aud mode (audmd) ? two modes branch trace mode or ram monitor mode can be selected by switching audmd. ? branch trace mode when the pc branches on execution of a branch instruction or generation of an interrupt in the user program , the branch is detected by the aud and the branch destination address is output from audata. the address is compared with the previously output address, and 4-, 8-, 16-, or 32-bit output is selected automatically according to the upper address matching status. ? ram monitor mode when an address is written to audata from off-chip, the data corresponding to that address is output. if an address and data are written to audata, the data is transferred to that address.
rev. 3.0, 09/04, page 730 of 1086 20.1.2 block diagram figure 20.1 shows a block diagram of the aud. pc output circuit address buffer data buffer mode control internal bus bus controller peripheral module bus on-chip memory on-chip peripheral module cpu audata0 audata1 audata2 audata3 audmd audck figure 20.1 aud block diagram 20.2 pin configuration table 20.1 shows the aud?s input/output pins. table 20.1 aud pins function name abbreviation branch trace mode ram monitor mode aud data audata3? audata0 branch destination address output monitor address/data input/output aud reset audrst aud reset input aud reset input aud mode audmd mode select input (l) mode select input (h) aud clock audck serial clock (p ) output serial clock input aud sync signal audsync data start position identification signal output data start position identification signal input
rev. 3.0, 09/04, page 731 of 1086 20.2.1 pin descriptions pins used in both modes pin description audmd the mode is selected by changing the input level at this pin. low: branch trace mode high: ram monitor mode the input at this pin should be changed when audrst is low. when no connection is made, this pin is pulled up internally. audrst the aud's internal buffers and logic are initialized by inputting a low level to this pin. when this signal goes low, the aud enters the reset state and the aud's internal buffers and logic are reset. when audrst goes high again after the audmd level settles, the aud starts operating in the selected mode. when no connection is made, this pin is pulled down internally.
rev. 3.0, 09/04, page 732 of 1086 pin functions in branch trace mode pin description audck this pin outputs the peripheral module operating frequency (p ). this is the clock for audata synchronization. audsync this pin indicates whether output from audata is valid. high: valid data is not being output low: an address is being output 1. when audsync is low when a program branch or interrupt branch occurs, the aud asserts audsync and outputs the branch destination address. the output order is a3?a0, a7?a4, a11?a8, a15?a12, a19?a16, a23?a20, a27?a24, a31?a28. 2. when audsync is high when waiting for branch destination address output, these pins constantly output 0011. when an branch occurs, audata3?audata2 output 10, and audata1? audata0 indicate whether a 4-, 8-, 16-, or 32-bit address is to be output by comparing the previous fully output address with the address output this time (see table below). audata1, audata0 00 address bits a31?a4 match; 4 address bits a3?a0 are to be output (i.e. output is performed once). 01 address bits a31?a8 match; 8 address bits a3?a0 and a7?a4 are to be output (i.e. output is performed twice). 10 address bits a31?a16 match; 16 address bits a3?a0, a7?a4, a11?a8, and a15?a12 are to be output (i.e. output is performed four times). 11 none of the above cases applies; 32 address bits a3?a0, a7? a4, a11?a8, and a15?a12, a19?a16, a23?a20, a27?a24, and a31?a28 are to be output (i.e. output is performed eight times). audata3 to audata0
rev. 3.0, 09/04, page 733 of 1086 pin functions in ram monitor mode pin description audck the external clock input pin. input the clock to be used for debugging to this pin. the input frequency must not exceed 10 mhz. when no connection is made, this pin is pulled up internally. audsync do not assert this pin until a command is input to audata from off-chip and the necessary data can be prepared. see the protocol description for details. when no connection is made, this pin is pulled up internally. audata3 to audata0 when a command is input from off-chip, data is output after ready reception. output starts when audsync is negated. see the protocol description for details. when no connections are made, these pins are pulled up internally. 20.3 branch trace mode 20.3.1 overview in this mode, the branch destination address is output when a branch occurs in the user program. branches may be caused by branch instruction execution or interrupt/exception processing, but no distinction is made between the two in this mode. 20.3.2 operation operation starts in branch trace mode when audrst is asserted, audmd is driven low, then audrst is negated. figure 20.2 shows an example of data output. while the user program is being executed without branches, the audata pins constantly output 0011 in synchronization with audck. when a branch occurs, after execution starts at the branch destination address in the pc, the previous fully output address (i.e. for which output was not interrupted by the occurrence of another branch) is compared with the current branch address, and depending on the result, audsync is asserted and the branch destination address output after 1-clock output of 1000 (in the case of 4-bit output), 1001 (8-bit output), 1010 (16-bit output), or 1011 (32-bit output). the initial value of the compared address is h'00000000. on completion of the cycle in which the address is output, audsync is negated and 0011 is output from the audata pins.
rev. 3.0, 09/04, page 734 of 1086 if another branch occurs during branch destination address output, the later branch has priority for output. in this case, audsync is negated and the audata pins output the address after outputting 10xx again (figure 20.3 shows an example of the output when consecutive branches occur). note that the compared address is the previous fully output address, and not an interrupted address (since the upper address of an interrupted address will be unknown). the interval from the start of execution at the branch destination address in the pc until the audata pins output 10xx is 1.5 or 2 audck cycles. audck 0011 0011 1011 a3?a0 a7?a4 a11?a8 a15?a12 a19?a16 a23?a20 a27?a24 a31?a28 0011 audata [3:0] start of execution at branch destination address in pc figure 20.2 example of data output (32-bit output) audck 0011 0011 1011 a3 ? a0 0011 0011 a3 ? a0 a7 ? a4 1010 a7 ? a4 a11 ? a8 a15 ? a12 audata [3:0] start of execution at branch destination address in pc (1) start of execution at branch destination address in pc (2) figure 20.3 example of output in case of successive branches
rev. 3.0, 09/04, page 735 of 1086 20.4 ram monitor mode 20.4.1 overview in this mode, all the modules connected to the sh7058?s internal or external bus can be read and written to, allowing ram monitoring and tuning to be carried out. 20.4.2 communication protocol the aud latches the audata input when audsync is asserted. the following audata input format should be used. 0000 dir a3 ? a0 a31 ? a28 d3 ? d0 dn ? dn-3 input format spare bits (4 bits): b'0000 command fixed at 1 0: read 1: write 00: byte 01: word 10: longword bit 3 bit 2 bit 1 bit 0 . . . . . . . . . . . . address data (in case of write only) b write: n = 7 w write: n = 15 l write: n = 31 figure 20.4 audata input format
rev. 3.0, 09/04, page 736 of 1086 20.4.3 operation operation starts in ram monitor mode when audmd is driven high after audrst has been asserted, then audrst is negated. figure 20.5 shows an example of a read operation, and figure 20.6 an example of a write operation. when audsync is asserted, input from the audata pins begins. when a command, address, or data (writing only) is input in the format shown in figure 20.2, execution of read/write access to the specified address is started. during internal execution, the aud returns not ready (0000). when execution is completed, the ready flag (0001) is returned (figures 20.5 and 20.6). table 20.2 shows the ready flag format. in a read, data of the specified size is output when audsync is negated following detection of this flag (figure 20.7). if a command other than the above is input in dir, the aud treats this as a command error, disables processing, and sets bit 1 in the ready flag to 1. if a read/write operation initiated by the command specified in dir causes a bus error, the aud disables processing and sets bit 2 in the ready flag to 1 (figure 20.7). table 20.2 ready flag format bit 3 bit 2 bit 1 bit 0 fixed at 0 0: normal status 1: bus error 0: normal status 1: bus error 0: not ready 1: ready bus error conditions are shown below. 1. word access to address 4n+1 or 4n+3 2. longword access to address 4n+1, 4n+2, or 4n+3 3. longword access to on-chip i/o 8-bit space 4. access to external space in single-chip mode audck not ready dir ready ready ready 0001 0001 0000 0000 1000 0001 a31 ? a28 d7 ? d4 d3 ? d0 a3 ? a0 audatan input/output switchover input output figure 20.5 example of read operation (byte read)
rev. 3.0, 09/04, page 737 of 1086 audck not ready ready dir ready ready 0000 0000 1110 0001 0001 0001 a31 ? a28 d3 ? d0 d31 ? d28 a3 ? a0 audatan input/output switchover input output figure 20.6 example of write operation (longword write) audck not ready dir ready (bus error) ready (bus error) ready (bus error) 0101 0101 0000 0000 1010 0101 a31 ? a28 a3 ? a0 audatan input/output switchover input output figure 20.7 example of error occurrence (longword read) 20.5 usage notes 20.5.1 initialization the debugger?s internal buffers and processing states are initialized in the following cases: 1. in a power-on reset 2. in hardware standby mode 3. when audrst is driven low 4. when the audsrst bit is set to 1 in the syscr1 register (see section 25.2.2) 5. when the mstop3 bit is set to 1 in the syscr2 register (see section 25.2.3) 20.5.2 operation in software standby mode the debugger is not initialized in software standby mode. however, since the sh7058?s internal operation halts in software standby mode: 1. when audmd is high (ram monitor mode): operation stops. this setting should not be used in standby mode. 2. when audmd is low (pc trace): operation stops. however, operation continues when software standby is released.
rev. 3.0, 09/04, page 738 of 1086
rev. 3.0, 09/04, page 739 of 1086 section 21 pin function controller (pfc) 21.1 overview the pin function controller (pfc) consists of registers for selecting multiplex pin functions and their input/output direction. table 21.1 shows the sh7058?s multiplex pins. table 21.1 sh7058 multiplex pins port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) a pa0 input/output (port) ti0a input (atu-ii) a pa1 input/output (port) ti0b input (atu-ii) a pa2 input/output (port) ti0c input (atu-ii) a pa3 input/output (port) ti0d input (atu-ii) a pa4 input/output (port) tio3a input/output (atu-ii) a pa5 input/output (port) tio3b input/output (atu-ii) a pa6 input/output (port) tio3c input/output (atu-ii) a pa7 input/output (port) tio3d input/output (atu-ii) a pa8 input/output (port) tio4a input/output (atu-ii) adto0a output (mtad) a pa9 input/output (port) tio4b input/output (atu-ii) adto0b output (mtad) a pa10 input/output (port) tio4c input/output (atu-ii) adto1a output (mtad) a pa11 input/output (port) tio4d input/output (atu-ii) adto1b output (mtad) a pa12 input/output (port) tio5a input/output (atu-ii) a pa13 input/output (port) tio5b input/output (atu-ii) a pa14 input/output (port) txd0 output (sci) a pa15 input/output (port) rxd0 input (sci) b pb0 input/output (port) to6a output (atu-ii) b pb1 input/output (port) to6b output (atu-ii) b pb2 input/output (port) to6c output (atu-ii) b pb3 input/output (port) to6d output (atu-ii) b pb4 input/output (port) to7a output (atu-ii) to8a output (atu-ii) b pb5 input/output (port) to7b output (atu-ii) to8b output (atu-ii) b pb6 input/output (port) to7c output (atu-ii) to8c output (atu-ii) b pb7 input/output (port) to7d output (atu-ii) to8d output (atu-ii) b pb8 input/output (port) txd3 output (sci) to8e output (atu-ii)
rev. 3.0, 09/04, page 740 of 1086 table 21.1 sh7058 multiplex pins (cont) port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) b pb9 input/output (port) rxd3 input (sci) to8f output (atu-ii) b pb10 input/output (port) txd4 output (sci) htxd0 output (hcan-ii) to8g output (atu-ii) b pb11 input/output (port) rxd4 input (sci) hrxd0 input (hcan-ii) to8h output (atu-ii) b pb12 input/output (port) tclka input (atu-ii) ubctrg output (ubc) b pb13 input/output (port) sck0 input/output (sci) b pb14 input/output (port) sck1 input/output (sci) tclkb input (atu-ii) ti10 input (atu-ii) b pb15 input/output (port) puls5 output (apc) sck2 input/output (sci) c pc0 input/output (port) txd1 output (sci) c pc1 input/output (port) rxd1 input (sci) c pc2 input/output (port) txd2 output (sci) c pc3 input/output (port) rxd2 input (sci) c pc4 input/output (port) irq0 input (intc) d pd0 input/output (port) tio1a input/output (atu-ii) d pd1 input/output (port) tio1b input/output (atu-ii) d pd2 input/output (port) tio1c input/output (atu-ii) d pd3 input/output (port) tio1d input/output (atu-ii) d pd4 input/output (port) tio1e input/output (atu-ii) d pd5 input/output (port) tio1f input/output (atu-ii) d pd6 input/output (port) tio1g input/output (atu-ii) d pd7 input/output (port) tio1h input/output (atu-ii) d pd8 input/output (port) puls0 output (apc) d pd9 input/output (port) puls1 output (apc) d pd10 input/output (port) puls2 output (apc) d pd11 input/output (port) puls3 output (apc) d pd12 input/output (port) puls4 output (apc) d pd13 input/output (port) puls6 output (apc) htxd0 output (hcan-ii) htxd1 output (hcan-ii) e pe0 input/output (port) a0 output (bsc) e pe1 input/output (port) a1 output (bsc) e pe2 input/output (port) a2 output (bsc) e pe3 input/output (port) a3 output (bsc) e pe4 input/output (port) a4 output (bsc) e pe5 input/output (port) a5 output (bsc) e pe6 input/output (port) a6 output (bsc) e pe7 input/output (port) a7 output (bsc)
rev. 3.0, 09/04, page 741 of 1086 table 21.1 sh7058 multiplex pins (cont) port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) e pe8 input/output (port) a8 output (bsc) e pe9 input/output (port) a9 output (bsc) e pe10 input/output (port) a10 output (bsc) e pe11 input/output (port) a11 output (bsc) e pe12 input/output (port) a12 output (bsc) e pe13 input/output (port) a13 output (bsc) e pe14 input/output (port) a14 output (bsc) e pe15 input/output (port) a15 output (bsc) f pf0 input/output (port) a16 output (bsc) f pf1 input/output (port) a17 output (bsc) f pf2 input/output (port) a18 output (bsc) f pf3 input/output (port) a19 output (bsc) f pf4 input/output (port) a20 output (bsc) f pf5 input/output (port) a21 output (bsc) pod input (port) f pf6 input/output (port) wrl output (bsc) f pf7 input/output (port) wrh output (bsc) f pf8 input/output (port) wait input (bsc) f pf9 input/output (port) rd output (bsc) f pf10 input/output (port) cs0 output (bsc) f pf11 input/output (port) cs1 output (bsc) f pf12 input/output (port) cs2 output (bsc) f pf13 input/output (port) cs3 output (bsc) f pf14 input/output (port) back output (bsc) f pf15 input/output (port) breq input (bsc) g pg0 input/output (port) puls7 output (apc) hrxd0 input (hcan-ii) hrxd1 input (hcan-ii) g pg1 input/output (port) irq1 input (intc) g pg2 input/output (port) irq2 input (intc) adend output (a/d) g pg3 input/output (port) irq3 input (intc) adtrg0 input (a/d) h ph0 input/output (port) d0 input/output (bsc) h ph1 input/output (port) d1 input/output (bsc) h ph2 input/output (port) d2 input/output (bsc) h ph3 input/output (port) d3 input/output (bsc) h ph4 input/output (port) d4 input/output (bsc)
rev. 3.0, 09/04, page 742 of 1086 table 21.1 sh7058 multiplex pins (cont) port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) h ph5 input/output (port) d5 input/output (bsc) h ph6 input/output (port) d6 input/output (bsc) h ph7 input/output (port) d7 input/output (bsc) h ph8 input/output (port) d8 input/output (bsc) h ph9 input/output (port) d9 input/output (bsc) h ph10 input/output (port) d10 input/output (bsc) h ph11 input/output (port) d11 input/output (bsc) h ph12 input/output (port) d12 input/output (bsc) h ph13 input/output (port) d13 input/output (bsc) h ph14 input/output (port) d14 input/output (bsc) h ph15 input/output (port) d15 input/output (bsc) j pj0 input/output (port) tio2a input/output (atu-ii) j pj1 input/output (port) tio2b input/output (atu-ii) j pj2 input/output (port) tio2c input/output (atu-ii) j pj3 input/output (port) tio2d input/output (atu-ii) j pj4 input/output (port) tio2e input/output (atu-ii) j pj5 input/output (port) tio2f input/output (atu-ii) j pj6 input/output (port) tio2g input/output (atu-ii) j pj7 input/output (port) tio2h input/output (atu-ii) j pj8 input/output (port) tio5c input/output (atu-ii) j pj9 input/output (port) tio5d input/output (atu-ii) j pj10 input/output (port) ti9a input (atu-ii) j pj11 input/output (port) ti9b input (atu-ii) j pj12 input/output (port) ti9c input (atu-ii) j pj13 input/output (port) ti9d input (atu-ii) j pj14 input/output (port) ti9e input (atu-ii) j pj15 input/output (port) ti9f input (atu-ii) k pk0 input/output (port) to8a output (atu-ii) k pk1 input/output (port) to8b output (atu-ii) k pk2 input/output (port) to8c output (atu-ii) k pk3 input/output (port) to8d output (atu-ii) k pk4 input/output (port) to8e output (atu-ii) k pk5 input/output (port) to8f output (atu-ii)
rev. 3.0, 09/04, page 743 of 1086 table 21.1 sh7058 multiplex pins (cont) port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) k pk6 input/output (port) to8g output (atu-ii) k pk7 input/output (port) to8h output (atu-ii) k pk8 input/output (port) to8i output (atu-ii) k pk9 input/output (port) to8j output (atu-ii) k pk10 input/output (port) to8k output (atu-ii) k pk11 input/output (port) to8l output (atu-ii) k pk12 input/output (port) to8m output (atu-ii) k pk13 input/output (port) to8n output (atu-ii) k pk14 input/output (port) to8o output (atu-ii) k pk15 input/output (port) to8p output (atu-ii) l pl0 input/output (port) ti10 input (atu-ii) l pl1 input/output (port) tio11a input/output (atu-ii) irq6 input (intc) l pl2 input/output (port) tio11b input/output (atu-ii) irq7 input (intc) l pl3 input/output (port) tclkb input (atu-ii) l pl4 input/output (port) adtrg0 input (a/d) l pl5 input/output (port) adtrg1 input (a/d) l pl6 input/output (port) adend output (a/d) l pl7 input/output (port) sck2 input/output (sci) l pl8 input/output (port) sck3 input/output (sci) l pl9 input/output (port) sck4 input/output (sci) irq5 input (intc) l pl10 input/output (port) htxd0 output (hcan-ii) htxd1 output (hcan-ii) htxd0 & htxd1 (hcan-ii) l pl11 input/output (port) hrxd0 input (hcan-ii) hrxd1 input (hcan-ii) hrxd0 & hrxd1 (hcan-ii) l pl12 input/output (port) irq4 input (intc) l pl13 input/output (port) irqout output (intc) irqout output (intc)
rev. 3.0, 09/04, page 744 of 1086 21.2 register configuration pfc registers are listed in table 21.2. table 21.2 pfc registers name abbreviation r/w initial value address access size port a io register paior r/w h'0000 h'fffff720 8, 16 port a control register h pacrh r/w h'0000 h'fffff722 8, 16 port a control register l pacrl r/w h'0000 h'fffff724 8, 16 port b io register pbior r/w h'0000 h'fffff730 8, 16 port b control register h pbcrh r/w h'0000 h'fffff732 8, 16 port b control register l pbcrl r/w h'0000 h'fffff734 8, 16 port b invert register pbir r/w h'0000 h'fffff736 8, 16 port c io register pcior r/w h'0000 h'fffff73a 8, 16 port c control register pccr r/w h'0000 h'fffff73c 8, 16 port d io register pdior r/w h'0000 h'fffff740 8, 16 port d control register h pdcrh r/w h'0000 h'fffff742 8, 16 port d control register l pdcrl r/w h'0000 h'fffff744 8, 16 port e io register peior r/w h'0000 h'fffff750 8, 16 port e control register pecr r/w h'0000 h'fffff752 8, 16 port f io register pfior r/w h'0000 h'fffff748 8, 16 port f control register h pfcrh r/w h'0015 h'fffff74a 8, 16 port f control register l pfcrl r/w h'5000 h'fffff74c 8, 16 port g io register pgior r/w h'0000 h'fffff760 8, 16 port g control register pgcr r/w h'0000 h'fffff762 8, 16 port h io register phior r/w h'0000 h'fffff728 8, 16 port h control register phcr r/w h'0000 h'fffff72a 8, 16 port j io register pjior r/w h'0000 h'fffff766 8, 16 port j control register h pjcrh r/w h'0000 h'fffff768 8, 16 port j control register l pjcrl r/w h'0000 h'fffff76a 8, 16 port k io register pkior r/w h'0000 h'fffff770 8, 16 port k control register h pkcrh r/w h'0000 h'fffff772 8, 16 port k control register l pkcrl r/w h'0000 h'fffff774 8, 16 port k invert register pkir r/w h'0000 h'fffff776 8, 16
rev. 3.0, 09/04, page 745 of 1086 table 21.2 pfc registers (cont) name abbreviation r/w initial value address access size port l io register plior r/w h'0000 h'fffff756 8, 16 port l control register h plcrh r/w h'0000 h'fffff758 8, 16 port l control register l plcrl r/w h'0000 h'fffff75a 8, 16 port l invert register plir r/w h'0000 h'fffff75c 8, 16 21.3 register descriptions 21.3.1 port a io register (paior) bit: 15 14 13 12 11 10 9 8 pa15 ior pa14 ior pa13 ior pa12 ior pa11 ior pa10 ior pa9 ior pa8 ior initial value: 00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit:76543210 pa7 ior pa6 ior pa5 ior pa4 ior pa3 ior pa2 ior pa1 ior pa0 ior initial value: 00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the port a io register (paior) is a 16-bit readable/writable register that selects the input/output direction of the 16 pins in port a. bits pa15ior to pa0ior correspond to pins pa15/rxd0 to pa0/ti0a. paior is enabled when port a pins function as general input/output pins (pa15 to pa0) or atu-ii input/output pins, and disabled otherwise. for bits 3 to 0, when atu-ii input capture input is selected, the paior bits should be cleared to 0. when port a pins function as pa15 to pa0 or atu-ii input/output pins, a pin becomes an output when the corresponding bit in paior is set to 1, and an input when the bit is cleared to 0. paior is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode.
rev. 3.0, 09/04, page 746 of 1086 21.3.2 port a control registers h and l (pacrh, pacrl) port a control registers h and l (pacrh, pacrl) are 16-bit readable/writable registers that select the functions of the 16 multiplex pins in port a. pacrh selects the functions of the pins for the upper 8 bits of port a, and pacrl selects the functions of the pins for the lower 8 bits. pacrh and pacrl are initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. they are not initialized in software standby mode or sleep mode. port a control register h (pacrh) bit: 15 14 13 12 11 10 9 8 ? pa15md ? pa14md ? pa13md ? pa12md initial value:00000000 r/w:rr/wrr/wrr/wrr/w bit:76543210 pa11md1 pa11md0 pa10md1 pa10md0 pa9md1 pa9md0 pa8md1 pa8md0 initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w ? bit 15?reserved: this bit is always read as 0. the write value should always be 0. ? bit 14?pa15 mode bit (pa15md): selects the function of pin pa15/rxd0. bit 14: pa15md description 0 general input/output (pa15) (initial value) 1 receive data input (rxd0) ? bit 13?reserved: this bit is always read as 0. the write value should always be 0. ? bit 12?pa14 mode bit (pa14md): selects the function of pin pa14/txd0. bit 12: pa14md description 0 general input/output (pa14) (initial value) 1 transmit data output (txd0) ? bit 11?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 747 of 1086 ? bit 10?pa13 mode bit (pa13md): selects the function of pin pa13/tio5b. bit 10: pa13md description 0 general input/output (pa13) (initial value) 1 atu-ii input capture input/output compare output (tio5b) ? bit 9?reserved: this bit is always read as 0. the write value should always be 0. ? bit 8?pa12 mode bit (pa12md): selects the function of pin pa12/tio5a. bit 8: pa12md description 0 general input/output (pa12) (initial value) 1 atu-ii input capture input/output compare output (tio5a) ? bits 7 and 6?pa11 mode bit 1 and 0 (pa11md1, pa11md0): select the function of pin pa11/tio4d/adto1b. bit 7: pa11md1 bit 6: pa11md0 description 0 0 general input/output (pa11) (initial value) 0 1 atu-ii input capture input/output compare output (tio4d) 1 0 setting prohibited 1 1 output compare 1b output (mtad) ? bits 5 and 4?pa10 mode bit 1 and 0 (pa10md1, pa10md0): select the function of pin pa10/tio4c/adto1b. bit 5: pa10md1 bit 4: pa10md0 description 0 0 general input/output (pa10) (initial value) 0 1 atu-ii input capture input/output compare output (tio4c) 1 0 setting prohibited 1 1 output compare 1a output (mtad)
rev. 3.0, 09/04, page 748 of 1086 ? bits 3 and 2?pa9 mode bit 1 and 0 (pa9md1, pa9md0): select the function of pin pa9/tio4b/adto0b. bit 3: pa9md1 bit 2: pa9md0 description 0 0 general input/output (pa9) (initial value) 0 1 atu-ii input capture input/output compare output (tio4b) 1 0 setting prohibited 1 1 output compare 0b output (mtad) ? bits 1 and 0?pa8 mode bit 1 and 0 (pa8md1, pa8md0): select the function of pin pa8/tio4a/adto0a. bit 1: pa8md1 bit 0: pa8md0 description 0 0 general input/output (pa8) (initial value) 0 1 atu-ii input capture input/output compare output (tio4a) 1 0 setting prohibited 1 1 output compare 0a output (mtad) port a control register l (pacrl) bit: 15 14 13 12 11 10 9 8 ? pa7md ? pa6md ? pa5md ? pa4md initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r r/w r r/w r r/w bit: 7 6 5 4 3 2 1 0 ? pa3md ? pa2md ? pa1md ? pa0md initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r r/w r r/w r r/w ? bit 15?reserved: this bit is always read as 0. the write value should always be 0. ? bit 14?pa7 mode bit (pa7md): selects the function of pin pa7/tio3d. bit 14: pa7md description 0 general input/output (pa7) (initial value) 1 atu-ii input capture input/output compare output (tio3d)
rev. 3.0, 09/04, page 749 of 1086 ? bit 13?reserved: this bit is always read as 0. the write value should always be 0. ? bit 12?pa6 mode bit (pa6md): selects the function of pin pa6/tio3c. bit 12: pa6md description 0 general input/output (pa6) (initial value) 1 atu-ii input capture input/output compare output (tio3c) ? bit 11?reserved: this bit is always read as 0. the write value should always be 0. ? bit 10?pa5 mode bit (pa5md): selects the function of pin pa5/tio3b. bit 10: pa5md description 0 general input/output (pa5) (initial value) 1 atu-ii input capture input/output compare output (tio3b) ? bit 9?reserved: this bit is always read as 0. the write value should always be 0. ? bit 8?pa4 mode bit (pa4md): selects the function of pin pa4/tio3a. bit 8: pa4md description 0 general input/output (pa4) (initial value) 1 atu-ii input capture input/output compare output (tio3a) ? bit 7?reserved: this bit is always read as 0. the write value should always be 0. ? bit 6?pa3 mode bit (pa3md): selects the function of pin pa3/ti0d. bit 6: pa3md description 0 general input/output (pa3) (initial value) 1 atu-ii input capture input (ti0d) ? bit 5?reserved: this bit is always read as 0. the write value should always be 0. ? bit 4?pa2 mode bit (pa2md): selects the function of pin pa2/ti0c. bit 4: pa2md description 0 general input/output (pa2) (initial value) 1 atu-ii input capture input (ti0c) ? bit 3?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 750 of 1086 ? bit 2?pa1 mode bit (pa1md): selects the function of pin pa1/ti0b. bit 2: pa1md description 0 general input/output (pa1) (initial value) 1 atu-ii input capture input (ti0b) ? bit 1?reserved: this bit is always read as 0. the write value should always be 0. ? bit 0?pa0 mode bit (pa0md): selects the function of pin pa0/ti0a. bit 0: pa0md description 0 general input/output (pa0) (initial value) 1 atu-ii input capture input (ti0a) 21.3.3 port b io register (pbior) bit: 15 14 13 12 11 10 9 8 pb15 ior pb14 ior pb13 ior pb12 ior pb11 ior pb10 ior pb9 ior pb8 ior initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit: 7 6 5 4 3 2 1 0 pb7 ior pb6 ior pb5 ior pb4 ior pb3 ior pb2 ior pb1 ior pb0 ior initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the port b io register (pbior) is a 16-bit readable/writable register that selects the input/output direction of the 16 pins in port b. bits pb15ior to pb0ior correspond to pins pb15/puls5/sck2 to pb0/to6a. pbior is enabled when port b pins function as general input/output pins (pb15 to pb0) or serial clock pins (sck0, sck1, sck2), and disabled otherwise. when port b pins function as pb15 to pb0 or sck0, sck1, and sck2, a pin becomes an output when the corresponding bit in pbior is set to 1, and an input when the bit is cleared to 0. pbior is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode.
rev. 3.0, 09/04, page 751 of 1086 21.3.4 port b control registers h and l (pbcrh, pbcrl) port b control registers h and l (pbcrh, pbcrl) are 16-bit readable/writable registers that select the functions of the 16 multiplex pins in port b. pbcrh selects the functions of the pins for the upper 8 bits of port b, and pbcrl selects the functions of the pins for the lower 8 bits. pbcrh and pbcrl are initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. they are not initialized in software standby mode or sleep mode. port b control register h (pbcrh) bit: 15 14 13 12 11 10 9 8 pb15 md1 pb15 md0 pb14 md1 pb14 md0 ? pb13 md pb12 md1 pb12 md0 initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r r/w r/w r/w bit: 7 6 5 4 3 2 1 0 pb11 md1 pb11 md0 pb10 md1 pb10 md0 pb9 md1 pb9 md0 pb8 md1 pb8 md0 initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w ? bits 15 and 14?pb15 mode bits 1 and 0 (pb15md1, pb15md0): these bits select the function of pin pb15/puls5/sck2. bit 15: pb15md1 bit 14: pb15md0 description 0 general input/output (pb15) (initial value) 0 1 apc pulse output (puls5) 0 serial clock input/output (sck2) 1 1 reserved (do not set)
rev. 3.0, 09/04, page 752 of 1086 ? bits 13 and 12?pb14 mode bits 1 and 0 (pb14md1, pb14md0): these bits select the function of pin pb14/sck1/tclkb/t110. bit 13: pb14md1 bit 12: pb14md0 description 0 general input/output (pb14) (initial value) 0 1 serial clock input/output (sck1) 0 atu-ii clock input (tclkb) 1 1 atu-ii edge input (ti10) ? bit 11?reserved: this bit is always read as 0. the write value should always be 0. ? bit 10?pb13 mode bit (pb13md): selects the function of pin pb13/sck0. bit 10: pb13md description 0 general input/output (pb13) (initial value) 1 serial clock input/output (sck0) ? bits 9 and 8?pb12 mode bits 1 and 0 (pb12md1, pb12md0): these bits select the function of pin pb12/tclka/ ubctrg . bit 9: pb12md1 bit 8: pb12md0 description 0 general input/output (pb12) (initial value) 0 1 atu-ii clock input (tclka) 0 trigger pulse output ( ubctrg ) 1 1 reserved (do not set) ? bits 7 and 6?pb11 mode bits 1 and 0 (pb11md1, pb11md0): these bits select the function of pin pb11/rxd4/hrxd0/to8h. bit 7: pb11md1 bit 6: pb11md0 description 0 general input/output (pb11) (initial value) 0 1 receive data input (rxd4) 0 hcan-ii receive data input (hrxd0) 1 1 atu-ii one-shot pulse output (to8h)
rev. 3.0, 09/04, page 753 of 1086 ? bits 5 and 4?pb10 mode bits 1 and 0 (pb10md1, pb10md0): these bits select the function of pin pb10/txd4/htxd0/to8g. bit 5: pb10md1 bit 4: pb10md0 description 0 general input/output (pb10) (initial value) 0 1 transmit data output (txd4) 0 hcan-ii transmit data output (htxd0) 1 1 atu-ii one-shot pulse output (to8g) ? bits 3 and 2?pb9 mode bits 1 and 0 (pb9md1, pb9md0): these bits select the function of pin pb9/rxd3/to8f. bit 3: pb9md1 bit 2: pb9md0 description 0 general input/output (pb9) (initial value) 0 1 receive data input (rxd3) 0 atu-ii one-shot pulse output (to8f) 1 1 reserved (do not set) ? bits 1 and 0?pb8 mode bits 1 and 0 (pb8md1, pb8md0): these bits select the function of pin pb8/txd3/to8e. bit 1: pb8md1 bit 0: pb8md0 description 0 general input/output (pb8) (initial value) 0 1 transmit data output (txd3) 0 atu-ii one-shot pulse output (to8e) 1 1 reserved (do not set) port b control register l (pbcrl) bit: 15 14 13 12 11 10 9 8 pb7md1 pb7md0 pb6md1 pb6md0 pb5md1 pb5md0 pb4md1 pb4md0 initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit: 7 6 5 4 3 2 1 0 ? pb3md ? pb2md ? pb1md ? pb0md initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r r/w r r/w r r/w
rev. 3.0, 09/04, page 754 of 1086 ? bits 15 and 14?pb7 mode bits 1 and 0 (pb7md1, pb7md0): these bits select the function of pin pb7/to7d/to8d. bit 15: pb7md1 bit 14: pb7md0 description 0 general input/output (pb7) (initial value) 0 1 atu-ii pwm output (to7d) 0 atu-ii one-shot pulse output (to8d) 1 1 reserved (do not set) ? bits 13 and 12?pb6 mode bits 1 and 0 (pb6md1, pb6md0): these bits select the function of pin pb6/to7c/to8c. bit 13: pb6md1 bit 12: pb6md0 description 0 general input/output (pb6) (initial value) 0 1 atu-ii pwm output (to7c) 0 atu-ii one-shot pulse output (to8c) 1 1 reserved (do not set) ? bits 11 and 10?pb5 mode bits 1 and 0 (pb5md1, pb5md0): these bits select the function of pin pb5/to7b/to8b. bit 11: pb5md1 bit 10: pb5md0 description 0 general input/output (pb5) (initial value) 0 1 atu-ii pwm output (to7b) 0 atu-ii one-shot pulse output (to8b) 1 1 reserved (do not set) ? bits 9 and 8?pb4 mode bits 1 and 0 (pb4md1, pb4md0): these bits select the function of pin pb4/to7a/to8a. bit 9: pb4md1 bit 8: pb4md0 description 0 general input/output (pb4) (initial value) 0 1 atu-ii pwm output (to7a) 0 atu-ii one-shot pulse output (to8a) 1 1 reserved (do not set) ? bit 7?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 755 of 1086 ? bit 6?pb3 mode bit (pb3md): selects the function of pin pb3/to6d. bit 6: pb3md description 0 general input/output (pb3) (initial value) 1 atu-ii pwm output (to6d) ? bit 5?reserved: this bit is always read as 0. the write value should always be 0. ? bit 4?pb2 mode bit (pb2md): selects the function of pin pb2/to6c. bit 4: pb2md description 0 general input/output (pb2) (initial value) 1 atu-ii pwm output (to6c) ? bit 3?reserved: this bit is always read as 0. the write value should always be 0. ? bit 2?pb1 mode bit (pb1md): selects the function of pin pb1/to6b. bit 2: pb1md description 0 general input/output (pb1) (initial value) 1 atu-ii pwm output (to6b) ? bit 1?reserved: this bit is always read as 0. the write value should always be 0. ? bit 0?pb0 mode bit (pb0md): selects the function of pin pb0/to6a. bit 0: pb0md description 0 general input/output (pb0) (initial value) 1 atu-ii pwm output (to6a)
rev. 3.0, 09/04, page 756 of 1086 21.3.5 port b invert register (pbir) bit: 15 14 13 12 11 10 9 8 pb15ir pb14ir pb13ir ? pb11ir pb10ir pb9ir pb8ir initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r r/w r/w r/w r/w bit: 7 6 5 4 3 2 1 0 pb7ir pb6ir pb5ir pb4ir pb3ir pb2ir pb1ir pb0ir initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the port b invert register (pbir) is a 16-bit readable/writable register that sets the port b inversion function. bits pb15ir to pb13ir and pb11ir to pb0ir correspond to pins pb15/puls5/sck2 to pb13/sck0 and pb11/rxd4/hrxd0/to8h to pb0/to6a. pbir is enabled when port b pins function as atu-ii outputs or serial clock pins, and disabled otherwise. when port b pins function as atu-ii outputs or serial clock pins, the value of a pin is inverted when the corresponding bit in pbir is set to 1. pbir is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode. pbnir description 0 value is not inverted (initial value) 1 value is inverted n = 15 to 13, 11 to 0
rev. 3.0, 09/04, page 757 of 1086 21.3.6 port c io register (pcior) bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ? initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r bit: 7 6 5 4 3 2 1 0 ? ? ? pc4ior pc3ior pc2ior pc1ior pc0ior initial value: 0 0 0 0 0 0 0 0 r/w: r r r r/w r/w r/w r/w r/w the port c io register (pcior) is a 16-bit readable/writable register that selects the input/output direction of the five pins in port c. bits pc4ior to pc0ior correspond to pins pc4/ irq0 to pc0/txd1. pcior is enabled when port c pins function as general input/output pins (pc4 to pc0), and disabled otherwise. when port c pins function as pc4 to pc0, a pin becomes an output when the corresponding bit in pcior is set to 1, and an input when the bit is cleared to 0. pcior is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode.
rev. 3.0, 09/04, page 758 of 1086 21.3.7 port c control register (pccr) bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? pc4md initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r/w bit: 7 6 5 4 3 2 1 0 ? pc3md ? pc2md ? pc1md ? pc0md initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r r/w r r/w r r/w the port c control register (pccr) is a 16-bit readable/writable register that selects the functions of the five multiplex pins in port c. pccr is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode. ? bits 15 to 9?reserved: these bits are always read as 0. the write value should always be 0. ? bit 8?pc4 mode bit (pc4md): selects the function of pin pc4/ irq0 . bit 8: pc4md description 0 general input/output (pc4) (initial value) 1 interrupt request input ( irq0 ) ? bit 7?reserved: this bit is always read as 0. the write value should always be 0. ? bit 6?pc3 mode bit (pc3md): selects the function of pin pc3/rxd2. bit 6: pc3md description 0 general input/output (pc3) (initial value) 1 receive data input (rxd2) ? bit 5?reserved: this bit is always read as 0. the write value should always be 0. ? bit 4?pc2 mode bit (pc2md): selects the function of pin pc2/txd2. bit 4: pc2md description 0 general input/output (pc2) (initial value) 1 transmit data output (txd2) ? bit 3?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 759 of 1086 ? bit 2?pc1 mode bit (pc1md): selects the function of pin pc1/rxd1. bit 2: pc1md description 0 general input/output (pc1) (initial value) 1 receive data input (rxd1) ? bit 1?reserved: this bit is always read as 0. the write value should always be 0. ? bit 0?pc0 mode bit (pc0md): selects the function of pin pc0/txd1. bit 0: pc0md description 0 general input/output (pc0) (initial value) 1 transmit data output (txd1) 21.3.8 port d io register (pdior) bit: 15 14 13 12 11 10 9 8 ? ? pd13 ior pd12 ior pd11 ior pd10 ior pd9 ior pd8 ior initial value: 0 0 0 0 0 0 0 0 r/w: r r r/w r/w r/w r/w r/w r/w bit: 7 6 5 4 3 2 1 0 pd7 ior pd6 ior pd5 ior pd4 ior pd3 ior pd2 ior pd1 ior pd0 ior initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the port d io register (pdior) is a 16-bit readable/writable register that selects the input/output direction of the 14 pins in port d. bits pd13ior to pd0ior correspond to pins pd13/puls6/htxd0/htxd1 to pd0/tio1a. pdior is enabled when port d pins function as general input/output pins (pd13 to pd0) or timer input/output pins, and disabled otherwise. when port d pins function as pd13 to pd0 or timer input/output pins, a pin becomes an output when the corresponding bit in pdior is set to 1, and an input when the bit is cleared to 0. pdior is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode.
rev. 3.0, 09/04, page 760 of 1086 21.3.9 port d control registers h and l (pdcrh, pdcrl) port d control registers h and l (pdcrh, pdcrl) are 16-bit readable/writable registers that select the functions of the 14 multiplex pins in port d. pdcrh selects the functions of the pins for the upper 6 bits of port d, and pdcrl selects the functions of the pins for the lower 8 bits. pdcrh and pdcrl are initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. they are not initialized in software standby mode or sleep mode. port d control register h (pdcrh) bit: 15 14 13 12 11 10 9 8 ? ? ? ? pd13 md1 pd13 md0 ? pd12 md initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r/w r/w r r/w bit: 7 6 5 4 3 2 1 0 ? pd11 md ? pd10 md ? pd9 md ? pd8 md initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r r/w r r/w r r/w ? bits 15 to 12?reserved: these bits are always read as 0. the write value should always be 0. ? bits 11 and 10?pd13 mode bits 1 and 0 (pd13md1, pd13md0): these bits select the function of pin pd13/puls6/htxd0/htxd1. bit 11: pd13md1 bit 10: pd13md0 description 0 general input/output (pd13) (initial value) 0 1 apc pulse output (puls6) 0 hcan-ii transmit data output (htxd0) 1 1 hcan-ii transmit data output (htxd1) ? bit 9?reserved: this bit is always read as 0. the write value should always be 0. ? bit 8?pd12 mode bit (pd12md): selects the function of pin pd12/puls4. bit 8: pd12md description 0 general input/output (pd12) (initial value) 1 apc pulse output (puls4)
rev. 3.0, 09/04, page 761 of 1086 ? bit 7?reserved: this bit is always read as 0. the write value should always be 0. ? bit 6?pd11 mode bit (pd11md): selects the function of pin pd11/puls3. bit 6: pd11md description 0 general input/output (pd11) (initial value) 1 apc pulse output (puls3) ? bit 5?reserved: this bit is always read as 0. the write value should always be 0. ? bit 4?pd10 mode bit (pd10md): selects the function of pin pd10/puls2. bit 4: pd10md description 0 general input/output (pd10) (initial value) 1 apc pulse output (puls2) ? bit 3?reserved: this bit is always read as 0. the write value should always be 0. ? bit 2?pd9 mode bit (pd9md): selects the function of pin pd9/puls1. bit 2: pd9md description 0 general input/output (pd9) (initial value) 1 apc pulse output (puls1) ? bit 1?reserved: this bit is always read as 0. the write value should always be 0. ? bit 0?pd8 mode bit (pd8md): selects the function of pin pd8/puls0. bit 0: pd8md description 0 general input/output (pd8) (initial value) 1 apc pulse output (puls0)
rev. 3.0, 09/04, page 762 of 1086 port d control register l (pdcrl) bit: 15 14 13 12 11 10 9 8 ? pd7md ? pd6md ? pd5md ? pd4md initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r r/w r r/w r r/w bit: 7 6 5 4 3 2 1 0 ? pd3md ? pd2md ? pd1md ? pd0md initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r r/w r r/w r r/w ? bit 15?reserved: this bit is always read as 0. the write value should always be 0. ? bit 14?pd7 mode bit (pd7md): selects the function of pin pd7/tio1h. bit 14: pd7md description 0 general input/output (pd7) (initial value) 1 atu-ii input capture input/output compare output (tio1h) ? bit 13?reserved: this bit is always read as 0. the write value should always be 0. ? bit 12?pd6 mode bit (pd6md): selects the function of pin pd6/tio1g. bit 12: pd6md description 0 general input/output (pd6) (initial value) 1 atu-ii input capture input/output compare output (tio1g) ? bit 11?reserved: this bit is always read as 0. the write value should always be 0. ? bit 10?pd5 mode bit (pd5md): selects the function of pin pd5/tio1f. bit 10: pd5md description 0 general input/output (pd5) (initial value) 1 atu-ii input capture input/output compare output (tio1f) ? bit 9?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 763 of 1086 ? bit 8?pd4 mode bit (pd4md): selects the function of pin pd4/tio1e. bit 8: pd4md description 0 general input/output (pd4) (initial value) 1 atu-ii input capture input/output compare output (tio1e) ? bit 7?reserved: this bit is always read as 0. the write value should always be 0. ? bit 6?pd3 mode bit (pd3md): selects the function of pin pd3/tio1d. bit 6: pd3md description 0 general input/output (pd3) (initial value) 1 atu-ii input capture input/output compare output (tio1d) ? bit 5?reserved: this bit is always read as 0. the write value should always be 0. ? bit 4?pd2 mode bit (pd2md): selects the function of pin pd2/tio1c. bit 4: pd2md description 0 general input/output (pd2) (initial value) 1 atu-ii input capture input/output compare output (tio1c) ? bit 3?reserved: this bit is always read as 0. the write value should always be 0. ? bit 2?pd1 mode bit (pd1md): selects the function of pin pd1/tio1b. bit 2: pd1md description 0 general input/output (pd1) (initial value) 1 atu-ii input capture input/output compare output (tio1b) ? bit 1?reserved: this bit is always read as 0. the write value should always be 0. ? bit 0?pd0 mode bit (pd0md): selects the function of pin pd0/tio1a. bit 0: pd0md description 0 general input/output (pd0) (initial value) 1 atu-ii input capture input/output compare output (tio1a)
rev. 3.0, 09/04, page 764 of 1086 21.3.10 port e io register (peior) bit: 15 14 13 12 11 10 9 8 pe15 ior pe14 ior pe13 ior pe12 ior pe11 ior pe10 ior pe9 ior pe8 ior initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit: 7 6 5 4 3 2 1 0 pe7 ior pe6 ior pe5 ior pe4 ior pe3 ior pe2 ior pe1 ior pe0 ior initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the port e io register (peior) is a 16-bit readable/writable register that selects the input/output direction of the 16 pins in port e. bits pe15ior to pe0ior correspond to pins pe15/a15 to pe0/a0. peior is enabled when port e pins function as general input/output pins (pe15 to pe0), and disabled otherwise. when port e pins function as pe15 to pe0, a pin becomes an output when the corresponding bit in peior is set to 1, and an input when the bit is cleared to 0. peior is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode.
rev. 3.0, 09/04, page 765 of 1086 21.3.11 port e control register (pecr) bit: 15 14 13 12 11 10 9 8 pe15 md pe14 md pe13 md pe12 md pe11 md pe10 md pe9 md pe8 md initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit: 7 6 5 4 3 2 1 0 pe7 md pe6 md pe5 md pe4 md pe3 md pe2 md pe1 md pe0 md initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the port e control register (pecr) is a 16-bit readable/writable register that selects the functions of the 16 multiplex pins in port e. pecr settings are not valid in all operating modes. 1. expanded mode with on-chip rom disabled port e pins function as address output pins, and pecr settings are invalid. 2. expanded mode with on-chip rom enabled port e pins are multiplexed as address output pins and general input/output pins. pecr settings are valid. 3. single-chip mode port e pins function as general input/output pins, and pecr settings are invalid. pecr is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode. ? bit 15?pe15 mode bit (pe15md): selects the function of pin pe15/a15. description bit 15: pe15md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 address output (a15) (initial value) general input/output (pe15) (initial value) general input/output (pe15) (initial value) 1 address output (a15) address output (a15) general input/output (pe15)
rev. 3.0, 09/04, page 766 of 1086 ? bit 14?pe14 mode bit (pe14md): selects the function of pin pe14/a14. description bit 14: pe14md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 address output (a14) (initial value) general input/output (pe14) (initial value) general input/output (pe14) (initial value) 1 address output (a14) address output (a14) general input/output (pe14) ? bit 13?pe13 mode bit (pe13md): selects the function of pin pe13/a13. description bit 13: pe13md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 address output (a13) (initial value) general input/output (pe13) (initial value) general input/output (pe13) (initial value) 1 address output (a13) address output (a13) general input/output (pe13) ? bit 12?pe12 mode bit (pe12md): selects the function of pin pe12/a12. description bit 12: pe12md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 address output (a12) (initial value) general input/output (pe12) (initial value) general input/output (pe12) (initial value) 1 address output (a12) address output (a12) general input/output (pe12) ? bit 11?pe11 mode bit (pe11md): selects the function of pin pe11/a11. description bit 11: pe11md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 address output (a11) (initial value) general input/output (pe11) (initial value) general input/output (pe11) (initial value) 1 address output (a11) address output (a11) general input/output (pe11)
rev. 3.0, 09/04, page 767 of 1086 ? bit 10?pe10 mode bit (pe10md): selects the function of pin pe10/a10. description bit 10: pe10md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 address output (a10) (initial value) general input/output (pe10) (initial value) general input/output (pe10) (initial value) 1 address output (a10) address output (a10) general input/output (pe10) ? bit 9?pe9 mode bit (pe9md): selects the function of pin pe9/a9. description bit 9: pe9md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 address output (a9) (initial value) general input/output (pe9) (initial value) general input/output (pe9) (initial value) 1 address output (a9) address output (a9) general input/output (pe9) ? bit 8?pe8 mode bit (pe8md): selects the function of pin pe8/a8. description bit 8: pe8md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 address output (a8) (initial value) general input/output (pe8) (initial value) general input/output (pe8) (initial value) 1 address output (a8) address output (a8) general input/output (pe8) ? bit 7?pe7 mode bit (pe7md): selects the function of pin pe7/a7. description bit 7: pe7md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 address output (a7) (initial value) general input/output (pe7) (initial value) general input/output (pe7) (initial value) 1 address output (a7) address output (a7) general input/output (pe7)
rev. 3.0, 09/04, page 768 of 1086 ? bit 6?pe6 mode bit (pe6md): selects the function of pin pe6/a6. description bit 6: pe6md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 address output (a6) (initial value) general input/output (pe6) (initial value) general input/output (pe6) (initial value) 1 address output (a6) address output (a6) general input/output (pe6) ? bit 5?pe5 mode bit (pe5md): selects the function of pin pe5/a5. description bit 5: pe5md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 address output (a5) (initial value) general input/output (pe5) (initial value) general input/output (pe5) (initial value) 1 address output (a5) address output (a5) general input/output (pe5) ? bit 4?pe4 mode bit (pe4md): selects the function of pin pe4/a4. description bit 4: pe4md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 address output (a4) (initial value) general input/output (pe4) (initial value) general input/output (pe4) (initial value) 1 address output (a4) address output (a4) general input/output (pe4) ? bit 3?pe3 mode bit (pe3md): selects the function of pin pe3/a3. description bit 3: pe3md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 address output (a3) (initial value) general input/output (pe3) (initial value) general input/output (pe3) (initial value) 1 address output (a3) address output (a3) general input/output (pe3)
rev. 3.0, 09/04, page 769 of 1086 ? bit 2?pe2 mode bit (pe2md): selects the function of pin pe2/a2. description bit 2: pe2md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 address output (a2) (initial value) general input/output (pe2) (initial value) general input/output (pe2) (initial value) 1 address output (a2) address output (a2) general input/output (pe2) ? bit 1?pe1 mode bit (pe1md): selects the function of pin pe1/a1. description bit 1: pe1md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 address output (a1) (initial value) general input/output (pe1) (initial value) general input/output (pe1) (initial value) 1 address output (a1) address output (a1) general input/output (pe1) ? bit 0?pe0 mode bit (pe0md): selects the function of pin pe0/a0. description bit 0: pe0md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 address output (a0) (initial value) general input/output (pe0) (initial value) general input/output (pe0) (initial value) 1 address output (a0) address output (a0) general input/output (pe0)
rev. 3.0, 09/04, page 770 of 1086 21.3.12 port f io register (pfior) bit: 15 14 13 12 11 10 9 8 pf15 ior pf14 ior pf13 ior pf12 ior pf11 ior pf10 ior pf9 ior pf8 ior initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit: 7 6 5 4 3 2 1 0 pf7 ior pf6 ior pf5 ior pf4 ior pf3 ior pf2 ior pf1 ior pf0 ior initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the port f io register (pfior) is a 16-bit readable/writable register that selects the input/output direction of the 16 pins in port f. bits pf15ior to pf0ior correspond to pins pf15/ breq to pf0/a16. pfior is enabled when port f pins function as general input/output pins (pf15 to pf0), and disabled otherwise. when port f pins function as pf15 to pf0, a pin becomes an output when the corresponding bit in pfior is set to 1, and an input when the bit is cleared to 0. pfior is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode.
rev. 3.0, 09/04, page 771 of 1086 21.3.13 port f control registers h and l (pfcrh, pfcrl) port f control registers h and l (pfcrh, pfcrl) are 16-bit readable/writable registers that select the functions of the 16 multiplex pins in port f and the function of the ck pin. pfcrh selects the functions of the pins for the upper 8 bits of port f, and pfcrl selects the functions of the pins for the lower 8 bits. pfcrh and pfcrl are initialized to h'0015 and h'5000, respectively, by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. they are not initialized in software standby mode or sleep mode. port f control register h (pfcrh) bit: 15 14 13 12 11 10 9 8 ckhiz pf15md ? pf14md ? pf13md ? pf12md initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r r/w r r/w r r/w bit: 7 6 5 4 3 2 1 0 ? pf11md ? pf10md ? pf9md ? pf8md initial value: 0 0 0 1 0 1 0 1 r/w: r r/w r r/w r r/w r r/w ? bit 15?ckhiz bit: selects the function of pin ck. bit: ckhiz description 0 ck pin output (initial value) 1 ck pin hi-z ? bit 14?pf15 mode bit (pf15md): selects the function of pin pf15/ breq . description bit 14: pf15md expanded mode single-chip mode 0 general input/output (pf15) (initial value) general input/output (pf15) (initial value) 1 bus request input ( breq ) general input/output (pf15) ? bit 13?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 772 of 1086 ? bit 12?pf14 mode bit (pf14md): selects the function of pin pf14/ back . description bit 12: pf14md expanded mode single-chip mode 0 general input/output (pf14) (initial value) general input/output (pf14) (initial value) 1 bus acknowledge output ( back ) general input/output (pf14) ? bit 11?reserved: this bit is always read as 0. the write value should always be 0. ? bit 10?pf13 mode bit (pf13md): selects the function of pin pf13/ cs3 . description bit 10: pf13md expanded mode single-chip mode 0 general input/output (pf13) (initial value) general input/output (pf13) (initial value) 1 chip select output ( cs3 ) general input/output (pf13) ? bit 9?reserved: this bit is always read as 0. the write value should always be 0. ? bit 8?pf12 mode bit (pf12md): selects the function of pin pf12/ cs2 . description bit 8: pf12md expanded mode single-chip mode 0 general input/output (pf12) (initial value) general input/output (pf12) (initial value) 1 chip select output ( cs2 ) general input/output (pf12) ? bit 7?reserved: this bit is always read as 0. the write value should always be 0. ? bit 6?pf11 mode bit (pf11md): selects the function of pin pf11/ cs1 . description bit 6: pf11md expanded mode single-chip mode 0 general input/output (pf11) (initial value) general input/output (pf11) (initial value) 1 chip select output ( cs1 ) general input/output (pf11) ? bit 5?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 773 of 1086 ? bit 4?pf10 mode bit (pf10md): selects the function of pin pf10/ cs0 . description bit 4: pf10md expanded mode single-chip mode 0 general input/output (pf10) general input/output (pf10) 1 chip select output ( cs0 ) (initial value) general input/output (pf10) (initial value) ? bit 3?reserved: this bit is always read as 0. the write value should always be 0. ? bit 2?pf9 mode bit (pf9md): selects the function of pin pf9/ rd . description bit 2: pf9md expanded mode single-chip mode 0 general input/output (pf9) general input/output (pf9) 1 read output ( rd ) (initial value) general input/output (pf9) (initial value) ? bit 1?reserved: this bit is always read as 0. the write value should always be 0. ? bit 0?pf8 mode bit (pf8md): selects the function of pin pf8/ wait . description bit 0: pf8md expanded mode single-chip mode 0 general input/output (pf8) general input/output (pf8) 1 wait state input ( wait ) (initial value) general input/output (pf8) (initial value) port f control register l (pfcrl) bit: 15 14 13 12 11 10 9 8 ? pf7md ? pf6md pf5md1 pf5md0 ? pf4md initial value: 0 1 0 1 0 0 0 0 r/w: r r/w r r/w r/w r/w r r/w bit: 7 6 5 4 3 2 1 0 ? pf3md ? pf2md ? pf1md ? pf0md initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r r/w r r/w r r/w ? bit 15?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 774 of 1086 ? bit 14?pf7 mode bit (pf7md): selects the function of pin pf7/ wrh . description bit 14: pf7md expanded mode single-chip mode 0 general input/output (pf7) general input/output (pf7) 1 upper write ( wrh ) (initial value) general input/output (pf7) (initial value) ? bit 13?reserved: this bit is always read as 0. the write value should always be 0. ? bit 12?pf6 mode bit (pf6md): selects the function of pin pf6/ wrl . description bit 12: pf6md expanded mode single-chip mode 0 general input/output (pf6) general input/output (pf6) 1 lower write ( wrl ) (initial value) general input/output (pf6) (initial value) ? bits 11 and 10?pf5 mode bits 1 and 0 (pf5md1, pf5md0): these bits select the function of pin pf5/a21/ pod . description bit 11: pf5md1 bit 10: pf5md0 expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 address output (a21) (initial value) general input/output (pf5) (initial value) general input/output (pf5) (initial value) 0 1 address output (a21) address output (a21) general input/output (pf5) 0 address output (a21) port output disable input ( pod ) port output disable input ( pod ) 1 1 reserved (do not set) reserved (do not set) reserved (do not set) ? bit 9?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 775 of 1086 ? bit 8?pf4 mode bit (pf4md): selects the function of pin pf4/a20. description bit 8: pf4md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 address output (a20) (initial value) general input/output (pf4) (initial value) general input/output (pf4) (initial value) 1 address output (a20) address output (a20) general input/output (pf4) ? bit 7?reserved: this bit is always read as 0. the write value should always be 0. ? bit 6?pf3 mode bit (pf3md): selects the function of pin pf3/a19. description bit 6: pf3md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 address output (a19) (initial value) general input/output (pf3) (initial value) general input/output (pf3) (initial value) 1 address output (a19) address output (a19) general input/output (pf3) ? bit 5?reserved: this bit is always read as 0. the write value should always be 0. ? bit 4?pf2 mode bit (pf2md): selects the function of pin pf2/a18. description bit 4: pf2md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 address output (a18) (initial value) general input/output (pf2) (initial value) general input/output (pf2) (initial value) 1 address output (a18) address output (a18) general input/output (pf2) ? bit 3?reserved: this bit is always read as 0. the write value should always be 0. ? bit 2?pf1 mode bit (pf1md): selects the function of pin pf1/a17. description bit 2: pf1md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 address output (a17) (initial value) general input/output (pf1) (initial value) general input/output (pf1) (initial value) 1 address output (a17) address output (a17) general input/output (pf1) ? bit 1?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 776 of 1086 ? bit 0?pf0 mode bit (pf0md): selects the function of pin pf0/a16. description bit 0: pf0md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 address output (a16) (initial value) general input/output (pf0) (initial value) general input/output (pf0) (initial value) 1 address output (a16) address output (a16) general input/output (pf0) 21.3.14 port g io register (pgior) bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ? initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r bit: 7 6 5 4 3 2 1 0 ? ? ? ? pg3ior pg2ior pg1ior pg0ior initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r/w r/w r/w r/w the port g io register (pgior) is a 16-bit readable/writable register that selects the input/output direction of the four pins in port g. bits pg3ior to pg0ior correspond to pins pg3/ irq3 / adtrg0 to pg0/puls7/hrxd0/hrxd1. when port g pins function as pg3 to pg0, a pin becomes an output when the corresponding bit in pgior is set to 1, and an input when the bit is cleared to 0. pgior is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode.
rev. 3.0, 09/04, page 777 of 1086 21.3.15 port g control register (pgcr) the port g control register (pgcr) is a 16-bit readable/writable register that selects the functions of the four multiplex pins in port g. pgcr is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode. bit: 15 14 13 12 11 10 9 8 ? ? ? ? ? ? ? ? initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r r r r bit: 7 6 5 4 3 2 1 0 pg3md1 pg3md0 pg2md1 pg2md0 ? pg1md pg0md1 pg0md0 initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r r/w r/w r/w ? bits 15 to 8?reserved: these bits are always read as 0. the write value should always be 0. ? bits 7 and 6?pg3 mode bits 1 and 0 (pg3md1, pg3md0): these bits select the function of pin pg3/ irq3 / adtrg0 . bit 7: pg3md1 bit 6: pg3md0 description 0 general input/output (pg3) (initial value) 0 1 interrupt request input ( irq3 ) 0 a/d conversion trigger input ( adtrg0 ) 1 1 reserved (do not set) ? bits 5 and 4?pg2 mode bits 1 and 0 (pg2md1, pg2md0): these bits select the function of pin pg2/ irq2 /adend. bit 5: pg2md1 bit 4: pg2md0 description 0 general input/output (pg2) (initial value) 0 1 interrupt request input ( irq2 ) 0 a/d conversion end output (adend) 1 1 reserved (do not set) ? bit 3?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 778 of 1086 ? bit 2?pg1 mode bit (pg1md): selects the function of pin pg1/ irq1 . bit 2: pg1md description 0 general input/output (pg1) (initial value) 1 interrupt request input ( irq1 ) ? bits 1 and 0?pg0 mode bits 1 and 0 (pg0md1, pg2md0): these bits select the function of pin pg0/puls7/hrxd0/hrxd1. bit 1: pg0md1 bit 0: pg0md0 description 0 general input/output (pg0) (initial value) 0 1 apc pulse output (puls7) 0 hcan-ii receive data input (hrxd0) 1 1 hcan-ii receive data input (hrxd1) 21.3.16 port h io register (phior) bit: 15 14 13 12 11 10 9 8 ph15 ior ph14 ior ph13 ior ph12 ior ph11 ior ph10 ior ph9 ior ph8 ior initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit: 7 6 5 4 3 2 1 0 ph7 ior ph6 ior ph5 ior ph4 ior ph3 ior ph2 ior ph1 ior ph0 ior initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the port h io register (phior) is a 16-bit readable/writable register that selects the input/output direction of the 16 pins in port h. bits ph15ior to ph0ior correspond to pins ph15/d15 to ph0/d0. phior is enabled when port h pins function as general input/output pins (ph15 to ph0), and disabled otherwise. when port h pins function as ph15 to ph0, a pin becomes an output when the corresponding bit in phior is set to 1, and an input when the bit is cleared to 0. phior is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode.
rev. 3.0, 09/04, page 779 of 1086 21.3.17 port h control register (phcr) bit: 15 14 13 12 11 10 9 8 ph15 md ph14 md ph13 md ph12 md ph11 md ph10 md ph9 md ph8 md initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit: 7 6 5 4 3 2 1 0 ph7 md ph6 md ph5 md ph4 md ph3 md ph2 md ph1 md ph0 md initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the port h control register (phcr) is a 16-bit readable/writable register that selects the functions of the 16 multiplex pins in port h. phcr settings are not valid in all operating modes. 1. expanded mode with on-chip rom disabled (area 0: 8-bit bus) port h pins d0 to d7 function as data input/output pins, and phcr settings are invalid. 2. expanded mode with on-chip rom disabled (area 0: 16-bit bus) port h pins function as data input/output pins, and phcr settings are invalid. 3. expanded mode with on-chip rom enabled port h pins are multiplexed as data input/output pins and general input/output pins. phcr settings are valid. 4. single-chip mode port h pins function as general input/output pins, and phcr settings are invalid. phcr is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode.
rev. 3.0, 09/04, page 780 of 1086 ? bit 15?ph15 mode bit (ph15md): selects the function of pin ph15/d15. description bit 15: ph15md expanded mode with rom disabled area 0: 8 bits expanded mode with rom disabled area 0: 16 bits expanded mode with rom enabled single-chip mode 0 general input/output (ph15) (initial value) data input/output (d15) (initial value) general input/output (ph15) (initial value) general input/output (ph15) (initial value) 1 data input/output (d15) data input/output (d15) data input/output (d15) general input/output (ph15) ? bit 14?ph14 mode bit (ph14md): selects the function of pin ph14/d14. description bit 14: ph14md expanded mode with rom disabled area 0: 8 bits expanded mode with rom disabled area 0: 16 bits expanded mode with rom enabled single-chip mode 0 general input/output (ph14) (initial value) data input/output (d14) (initial value) general input/output (ph14) (initial value) general input/output (ph14) (initial value) 1 data input/output (d14) data input/output (d14) data input/output (d14) general input/output (ph14) ? bit 13?ph13 mode bit (ph13md): selects the function of pin ph13/d13. description bit 13: ph13md expanded mode with rom disabled area 0: 8 bits expanded mode with rom disabled area 0: 16 bits expanded mode with rom enabled single-chip mode 0 general input/output (ph13) (initial value) data input/output (d13) (initial value) general input/output (ph13) (initial value) general input/output (ph13) (initial value) 1 data input/output (d13) data input/output (d13) data input/output (d13) general input/output (ph13)
rev. 3.0, 09/04, page 781 of 1086 ? bit 12?ph12 mode bit (ph12md): selects the function of pin ph12/d12. description bit 12: ph12md expanded mode with rom disabled area 0: 8 bits expanded mode with rom disabled area 0: 16 bits expanded mode with rom enabled single-chip mode 0 general input/output (ph12) (initial value) data input/output (d12) (initial value) general input/output (ph12) (initial value) general input/output (ph12) (initial value) 1 data input/output (d12) data input/output (d12) data input/output (d12) general input/output (ph12) ? bit 11?ph11 mode bit (ph11md): selects the function of pin ph11/d11. description bit 11: ph11md expanded mode with rom disabled area 0: 8 bits expanded mode with rom disabled area 0: 16 bits expanded mode with rom enabled single-chip mode 0 general input/output (ph11) (initial value) data input/output (d11) (initial value) general input/output (ph11) (initial value) general input/output (ph11) (initial value) 1 data input/output (d11) data input/output (d11) data input/output (d11) general input/output (ph11) ? bit 10?ph10 mode bit (ph10md): selects the function of pin ph10/d10. description bit 10: ph10md expanded mode with rom disabled area 0: 8 bits expanded mode with rom disabled area 0: 16 bits expanded mode with rom enabled single-chip mode 0 general input/output (ph10) (initial value) data input/output (d10) (initial value) general input/output (ph10) (initial value) general input/output (ph10) (initial value) 1 data input/output (d10) data input/output (d10) data input/output (d10) general input/output (ph10)
rev. 3.0, 09/04, page 782 of 1086 ? bit 9?ph9 mode bit (ph9md): selects the function of pin ph9/d9. description bit 9: ph9md expanded mode with rom disabled area 0: 8 bits expanded mode with rom disabled area 0: 16 bits expanded mode with rom enabled single-chip mode 0 general input/output (ph9) (initial value) data input/output (d9) (initial value) general input/output (ph9) (initial value) general input/output (ph9) (initial value) 1 data input/output (d9) data input/output (d9) data input/output (d9) general input/output (ph9) ? bit 8?ph8 mode bit (ph8md): selects the function of pin ph8/d8. description bit 8: ph8md expanded mode with rom disabled area 0: 8 bits expanded mode with rom disabled area 0: 16 bits expanded mode with rom enabled single-chip mode 0 general input/output (ph8) (initial value) data input/output (d8) (initial value) general input/output (ph8) (initial value) general input/output (ph8) (initial value) 1 data input/output (d8) data input/output (d8) data input/output (d8) general input/output (ph8) ? bit 7?ph7 mode bit (ph7md): selects the function of pin ph7/d7. description bit 7: ph7md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 data input/output (d7) (initial value) general input/output (ph7) (initial value) general input/output (ph7) (initial value) 1 data input/output (d7) data input/output (d7) general input/output (ph7)
rev. 3.0, 09/04, page 783 of 1086 ? bit 6?ph6 mode bit (ph6md): selects the function of pin ph6/d6. description bit 6: ph6md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 data input/output (d6) (initial value) general input/output (ph6) (initial value) general input/output (ph6) (initial value) 1 data input/output (d6) data input/output (d6) general input/output (ph6) ? bit 5?ph5 mode bit (ph5md): selects the function of pin ph5/d5. description bit 5: ph5md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 data input/output (d5) (initial value) general input/output (ph5) (initial value) general input/output (ph5) (initial value) 1 data input/output (d5) data input/output (d5) general input/output (ph5) ? bit 4?ph4 mode bit (ph4md): selects the function of pin ph4/d4. description bit 4: ph4md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 data input/output (d4) (initial value) general input/output (ph4) (initial value) general input/output (ph4) (initial value) 1 data input/output (d4) data input/output (d4) general input/output (ph4) ? bit 3?ph3 mode bit (ph3md): selects the function of pin ph3/d3. description bit 3: ph3md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 data input/output (d3) (initial value) general input/output (ph3) (initial value) general input/output (ph3) (initial value) 1 data input/output (d3) data input/output (d3) general input/output (ph3)
rev. 3.0, 09/04, page 784 of 1086 ? bit 2?ph2 mode bit (ph2md): selects the function of pin ph2/d2. description bit 2: ph2md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 data input/output (d2) (initial value) general input/output (ph2) (initial value) general input/output (ph2) (initial value) 1 data input/output (d2) data input/output (d2) general input/output (ph2) ? bit 1?ph1 mode bit (ph1md): selects the function of pin ph1/d1. description bit 1: ph1md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 data input/output (d1) (initial value) general input/output (ph1) (initial value) general input/output (ph1) (initial value) 1 data input/output (d1) data input/output (d1) general input/output (ph1) ? bit 0?ph0 mode bit (ph0md): selects the function of pin ph0/d0. description bit 0: ph0md expanded mode with rom disabled expanded mode with rom enabled single-chip mode 0 data input/output (d0) (initial value) general input/output (ph0) (initial value) general input/output (ph0) (initial value) 1 data input/output (d0) data input/output (d0) general input/output (ph0)
rev. 3.0, 09/04, page 785 of 1086 21.3.18 port j io register (pjior) bit: 15 14 13 12 11 10 9 8 pj15 ior pj14 ior pj13 ior pj12 ior pj11 ior pj10 ior pj9 ior pj8 ior initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit: 7 6 5 4 3 2 1 0 pj7 ior pj6 ior pj5 ior pj4 ior pj3 ior pj2 ior pj1 ior pj0 ior initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the port j io register (pjior) is a 16-bit readable/writable register that selects the input/output direction of the 16 pins in port j. bits pj15ior to pj0ior correspond to pins pj15/ti9f to pj0/tio2a. pjior is enabled when port j pins function as general input/output pins (pj15 to pj0) or atu-ii input/output pins, and disabled otherwise. when atu-ii event counter input is selected, however, the bits 10 to 15 of the pjior should be cleared to 0. when port j pins function as pj15 to pj0 or atu-ii input/output pins, a pin becomes an output when the corresponding bit in pjior is set to 1, and an input when the bit is cleared to 0. pjior is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode.
rev. 3.0, 09/04, page 786 of 1086 21.3.19 port j control registers h and l (pjcrh, pjcrl) port j control registers h and l (pjcrh, pjcrl) are 16-bit readable/writable registers that select the functions of the 16 multiplex pins in port j. pjcrh selects the functions of the pins for the upper 8 bits of port j, and pjcrl selects the functions of the pins for the lower 8 bits. pjcrh and pjcrl are initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. they are not initialized in software standby mode or sleep mode. port j control register h (pjcrh) bit: 15 14 13 12 11 10 9 8 ? pj15md ? pj14md ? pj13md ? pj12md initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r r/w r r/w r r/w bit: 7 6 5 4 3 2 1 0 ? pj11md ? pj10md ? pj9md ? pj8md initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r r/w r r/w r r/w ? bit 15?reserved: this bit is always read as 0. the write value should always be 0. ? bit 14?pj15 mode bit (pj15md): selects the function of pin pj15/ti9f. bit 14: pj15md description 0 general input/output (pj15) (initial value) 1 atu-ii event counter input (ti9f) ? bit 13?reserved: this bit is always read as 0. the write value should always be 0. ? bit 12?pj14 mode bit (pj14md): selects the function of pin pj14/ti9e. bit 12: pj14md description 0 general input/output (pj14) (initial value) 1 atu-ii event counter input (ti9e) ? bit 11?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 787 of 1086 ? bit 10?pj13 mode bit (pj13md): selects the function of pin pj13/ti9d. bit 10: pj13md description 0 general input/output (pj13) (initial value) 1 atu-ii event counter input (ti9d) ? bit 9?reserved: this bit is always read as 0. the write value should always be 0. ? bit 8?pj12 mode bit (pj12md): selects the function of pin pj12/ti9c. bit 8: pj12md description 0 general input/output (pj12) (initial value) 1 atu-ii event counter input (ti9c) ? bit 7?reserved: this bit is always read as 0. the write value should always be 0. ? bit 6?pj11 mode bit (pj11md): selects the function of pin pj11/ti9b. bit 6: pj11md description 0 general input/output (pj11) (initial value) 1 atu-ii event counter input (ti9b) ? bit 5?reserved: this bit is always read as 0. the write value should always be 0. ? bit 4?pj10 mode bit (pj10md): selects the function of pin pj10/ti9a. bit 4: pj10md description 0 general input/output (pj10) (initial value) 1 atu-ii event counter input (ti9a) ? bit 3?reserved: this bit is always read as 0. the write value should always be 0. ? bit 2?pj9 mode bit (pj9md): selects the function of pin pj9/tio5d. bit 2: pj9md description 0 general input/output (pj9) (initial value) 1 atu-ii input capture input/output compare output (tio5d) ? bit 1?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 788 of 1086 ? bit 0?pj8 mode bit (pj8md): selects the function of pin pj8/tio5c. bit 0: pj8md description 0 general input/output (pj8) (initial value) 1 atu-ii input capture input/output compare output (tio5c) port j control register l (pjcrl) bit: 15 14 13 12 11 10 9 8 ? pj7md ? pj6md ? pj5md ? pj4md initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r r/w r r/w r r/w bit: 7 6 5 4 3 2 1 0 ? pj3md ? pj2md ? pj1md ? pj0md initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r r/w r r/w r r/w ? bit 15?reserved: this bit is always read as 0. the write value should always be 0. ? bit 14?pj7 mode bit (pj7md): selects the function of pin pj7/tio2h. bit 14: pj7md description 0 general input/output (pj7) (initial value) 1 atu-ii input capture input/output compare output (tio2h) ? bit 13?reserved: this bit is always read as 0. the write value should always be 0. ? bit 12?pj6 mode bit (pj6md): selects the function of pin pj6/tio2g. bit 12: pj6md description 0 general input/output (pj6) (initial value) 1 atu-ii input capture input/output compare output (tio2g) ? bit 11?reserved: this bit is always read as 0. the write value should always be 0. ? bit 10?pj5 mode bit (pj5md): selects the function of pin pj5/tio2f. bit 10: pj5md description 0 general input/output (pj5) (initial value) 1 atu-ii input capture input/output compare output (tio2f)
rev. 3.0, 09/04, page 789 of 1086 ? bit 9?reserved: this bit is always read as 0. the write value should always be 0. ? bit 8?pj4 mode bit (pj4md): selects the function of pin pj4/tio2e. bit 8: pj4md description 0 general input/output (pj4) (initial value) 1 atu-ii input capture input/output compare output (tio2e) ? bit 7?reserved: this bit is always read as 0. the write value should always be 0. ? bit 6?pj3 mode bit (pj3md): selects the function of pin pj3/tio2d. bit 6: pj3md description 0 general input/output (pj3) (initial value) 1 atu-ii input capture input/output compare output (tio2d) ? bit 5?reserved: this bit is always read as 0. the write value should always be 0. ? bit 4?pj2 mode bit (pj2md): selects the function of pin pj2/tio2c. bit 4: pj2md description 0 general input/output (pj2) (initial value) 1 atu-ii input capture input/output compare output (tio2c) ? bit 3?reserved: this bit is always read as 0. the write value should always be 0. ? bit 2?pj1 mode bit (pj1md): selects the function of pin pj1/tio2b. bit 2: pj1md description 0 general input/output (pj1) (initial value) 1 atu-ii input capture input/output compare output (tio2b) ? bit 1?reserved: this bit is always read as 0. the write value should always be 0. ? bit 0?pj0 mode bit (pj0md): selects the function of pin pj0/tio2a. bit 0: pj0md description 0 general input/output (pj0) (initial value) 1 atu-ii input capture input/output compare output (tio2a)
rev. 3.0, 09/04, page 790 of 1086 21.3.20 port k io register (pkior) bit: 15 14 13 12 11 10 9 8 pk15 ior pk14 ior pk13 ior pk12 ior pk11 ior pk10 ior pk9 ior pk8 ior initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit: 7 6 5 4 3 2 1 0 pk7 ior pk6 ior pk5 ior pk4 ior pk3 ior pk2 ior pk1 ior pk0 ior initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the port k io register (pkior) is a 16-bit readable/writable register that selects the input/output direction of the 16 pins in port k. bits pk15ior to pk0ior correspond to pins pk15/to8p to pk0/to8a. pkior is enabled when port k pins function as general input/output pins (pk15 to pk0), and disabled otherwise. when port k pins function as pk15 to pk0, a pin becomes an output when the corresponding bit in pkior is set to 1, and an input when the bit is cleared to 0. pkior is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode. 21.3.21 port k control registers h and l (pkcrh, pkcrl) port k control registers h and l (pkcrh, pkcrl) are 16-bit readable/writable registers that select the functions of the 16 multiplex pins in port k. pkcrh selects the functions of the pins for the upper 8 bits of port k, and pkcrl selects the functions of the pins for the lower 8 bits. pkcrh and pkcrl are initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. they are not initialized in software standby mode or sleep mode.
rev. 3.0, 09/04, page 791 of 1086 port k control register h (pkcrh) bit: 15 14 13 12 11 10 9 8 ? pk15 md ? pk14 md ? pk13 md ? pk12 md initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r r/w r r/w r r/w bit: 7 6 5 4 3 2 1 0 ? pk11 md ? pk10 md ? pk9 md ? pk8 md initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r r/w r r/w r r/w ? bit 15?reserved: this bit is always read as 0. the write value should always be 0. ? bit 14?pk15 mode bit (pk15md): selects the function of pin pk15/to8p. bit 14: pk15md description 0 general input/output (pk15) (initial value) 1 atu-ii one-shot pulse output (to8p) ? bit 13?reserved: this bit is always read as 0. the write value should always be 0. ? bit 12?pk14 mode bit (pk14md): selects the function of pin pk14/to8o. bit 12: pk14md description 0 general input/output (pk14) (initial value) 1 atu-ii one-shot pulse output (to8o) ? bit 11?reserved: this bit is always read as 0. the write value should always be 0. ? bit 10?pk13 mode bit (pk13md): selects the function of pin pk13/to8n. bit 10: pk13md description 0 general input/output (pk13) (initial value) 1 atu-ii one-shot pulse output (to8n) ? bit 9?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 792 of 1086 ? bit 8?pk12 mode bit (pk12md): selects the function of pin pk12/to8m. bit 8: pk12md description 0 general input/output (pk12) (initial value) 1 atu-ii one-shot pulse output (to8m) ? bit 7?reserved: this bit is always read as 0. the write value should always be 0. ? bit 6?pk11 mode bit (pk11md): selects the function of pin pk11/to8l. bit 6: pk11md description 0 general input/output (pk11) (initial value) 1 atu-ii one-shot pulse output (to8l) ? bit 5?reserved: this bit is always read as 0. the write value should always be 0. ? bit 4?pk10 mode bit (pk10md): selects the function of pin pk10/to8k. bit 4: pk10md description 0 general input/output (pk10) (initial value) 1 atu-ii one-shot pulse output (to8k) ? bit 3?reserved: this bit is always read as 0. the write value should always be 0. ? bit 2?pk9 mode bit (pk9md): selects the function of pin pk9/to8j. bit 2: pk9md description 0 general input/output (pk9) (initial value) 1 atu-ii one-shot pulse output (to8j) ? bit 1?reserved: this bit is always read as 0. the write value should always be 0. ? bit 0?pk8 mode bit (pk8md): selects the function of pin pk8/to8i. bit 0: pk8md description 0 general input/output (pk8) (initial value) 1 atu-ii one-shot pulse output (to8i)
rev. 3.0, 09/04, page 793 of 1086 port k control register l (pkcrl) bit: 15 14 13 12 11 10 9 8 ? pk7md ? pk6md ? pk5md ? pk4md initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r r/w r r/w r r/w bit: 7 6 5 4 3 2 1 0 ? pk3md ? pk2md ? pk1md ? pk0md initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r r/w r r/w r r/w ? bit 15?reserved: this bit is always read as 0. the write value should always be 0. ? bit 14?pk7 mode bit (pk7md): selects the function of pin pk7/to8h. bit 14: pk7md description 0 general input/output (pk7) (initial value) 1 atu-ii one-shot pulse output (to8h) ? bit 13?reserved: this bit is always read as 0. the write value should always be 0. ? bit 12?pk6 mode bit (pk6md): selects the function of pin pk6/to8g. bit 12: pk6md description 0 general input/output (pk6) (initial value) 1 atu-ii one-shot pulse output (to8g) ? bit 11?reserved: this bit is always read as 0. the write value should always be 0. ? bit 10?pk5 mode bit (pk5md): selects the function of pin pk5/to8f. bit 10: pk5md description 0 general input/output (pk5) (initial value) 1 atu-ii one-shot pulse output (to8f) ? bit 9?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 794 of 1086 ? bit 8?pk4 mode bit (pk4md): selects the function of pin pk4/to8e. bit 8: pk4md description 0 general input/output (pk4) (initial value) 1 atu-ii one-shot pulse output (to8e) ? bit 7?reserved: this bit is always read as 0. the write value should always be 0. ? bit 6?pk3 mode bit (pk3md): selects the function of pin pk3/to8d. bit 6: pk3md description 0 general input/output (pk3) (initial value) 1 atu-ii one-shot pulse output (to8d) ? bit 5?reserved: this bit is always read as 0. the write value should always be 0. ? bit 4?pk2 mode bit (pk2md): selects the function of pin pk2/to8c. bit 4: pk2md description 0 general input/output (pk2) (initial value) 1 atu-ii one-shot pulse output (to8c) ? bit 3?reserved: this bit is always read as 0. the write value should always be 0. ? bit 2?pk1 mode bit (pk1md): selects the function of pin pk1/to8b. bit 2: pk1md description 0 general input/output (pk1) (initial value) 1 atu-ii one-shot pulse output (to8b) ? bit 1?reserved: this bit is always read as 0. the write value should always be 0. ? bit 0?pk0 mode bit (pk0md): selects the function of pin pk0/to8a. bit 0: pk0md description 0 general input/output (pk0) (initial value) 1 atu-ii one-shot pulse output (to8a)
rev. 3.0, 09/04, page 795 of 1086 21.3.22 port k invert register (pkir) bit: 15 14 13 12 11 10 9 8 pk15ir pk14ir pk13ir pk12ir pk11ir pk10ir pk9ir pk8ir initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit: 7 6 5 4 3 2 1 0 pk7ir pk6ir pk5ir pk4ir pk3ir pk2ir pk1ir pk0ir initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the port k invert register (pkir) is a 16-bit readable/writable register that sets the port k inversion function. bits pk15ir to pk0ir correspond to pins pk15/to8p to pk0/to8a. pkir is enabled when port k pins function as atu-ii outputs, and disabled otherwise. when port k pins function as atu-ii outputs, the value of a pin is inverted when the corresponding bit in pkir is set to 1. pkir is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode. pknir description 0 value is not inverted (initial value) 1 value is inverted n = 15 to 0
rev. 3.0, 09/04, page 796 of 1086 21.3.23 port l io register (plior) bit: 15 14 13 12 11 10 9 8 ? ? pl13 ior pl12 ior pl11 ior pl10 ior pl9 ior pl8 ior initial value: 0 0 0 0 0 0 0 0 r/w: r r r/w r/w r/w r/w r/w r/w bit: 7 6 5 4 3 2 1 0 pl7 ior pl6 ior pl5 ior pl4 ior pl3 ior pl2 ior pl1 ior pl0 ior initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the port l io register (plior) is a 16-bit readable/writable register that selects the input/output direction of the 14 pins in port l. bits pl13ior to pl0ior correspond to pins pl13/ irqout to pl0/ti10. plior is enabled when port l pins function as general input/output pins (pl13 to pl0), timer input/output pins (tio11a, tio11b), or serial clock pins (sck2, sck3, sck4), and disabled otherwise. when port l pins function as pl13 to pl0, tio11a and tio11b, or sck2, sck3, and sck4, a pin becomes an output when the corresponding bit in plior is set to 1, and an input when the bit is cleared to 0. plior is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode.
rev. 3.0, 09/04, page 797 of 1086 21.3.24 port l control registers h and l (plcrh, plcrl) port l control registers h and l (plcrh, plcrl) are 16-bit readable/writable registers that select the functions of the 14 multiplex pins in port l. plcrh selects the functions of the pins for the upper 6 bits of port l, and plcrl selects the functions of the pins for the lower 8 bits. plcrh and plcrl are initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. they are not initialized in software standby mode or sleep mode. port l control register h (plcrh) bit: 15 14 13 12 11 10 9 8 ? ? ? ? pl13 md1 pl13 md0 ? pl12 md initial value: 0 0 0 0 0 0 0 0 r/w: r r r r r/w r/w r r/w bit: 7 6 5 4 3 2 1 0 pl11 md1 pl11 md0 pl10 md1 pl10 md0 pl9 md1 pl9 md0 ? pl8 md initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r r/w ? bits 15 to 12?reserved: these bits are always read as 0. the write value should always be 0. ? bits 11 and 10?pl13 mode bits 1 and 0 (pl13md1, pl13md0): these bits select the function of pin pl13/ irqout . bit 11: pl13md1 bit 10: pl13md0 description 0 general input/output (pl13) (initial value) 0 1 irqout is fixed high ( irqout ) 0 irqout is output by intc interrupt request ( irqout ) 1 1 reserved (do not set) ? bit 9?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 798 of 1086 ? bit 8?pl12 mode bit (pl12md): selects the function of pin pl12/ irq4 . bit 8: pl12md description 0 general input/output (pl12) (initial value) 1 interrupt request input ( irq4 ) ? bits 7 and 6?pl11 mode bits 1 and 0 (pl11md1, pl11md0): these bits select the function of pin pl11/hrxd0/hrxd1. bit 7: pl11md1 bit 6: pl11md0 description 0 general input/output (pl11) (initial value) 0 1 hcan-ii receive data input (hrxd0) 0 hcan-ii receive data input (hrxd1) 1 1 hcan-ii receive data input (both hrxd0 and hrxd1 input) ? bits 5 and 4?pl10 mode bits 1 and 0 (pl10md1, pl10md0): these bits select the function of pin pl10/htxd0/htxd1. bit 5: pl10md1 bit 4: pl10md0 description 0 general input/output (pl10) (initial value) 0 1 hcan-ii transmit data output (htxd0) 0 hcan-ii transmit data output (htxd1) 1 1 hcan-ii transmit data output (and of htxd0 and htxd1) ? bits 3 and 2?pl9 mode bits 1 and 0 (pl9md1, pl9md0): these bits select the function of pin pl9/sck4/ irq5 . bit 3: pl9md1 bit 2: pl9md0 description 0 general input/output (pl9) (initial value) 0 1 serial clock input/output (sck4) 0 interrupt request input ( irq5 ) 1 1 reserved (do not set) ? bit 1?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 799 of 1086 ? bit 0?pl8 mode bit (pl8md): selects the function of pin pl8/sck3. bit 0: pl8md description 0 general input/output (pl8) (initial value) 1 serial clock input/output (sck3) port l control register l (plcrl) bit: 15 14 13 12 11 10 9 8 ? pl7md ? pl6md ? pl5md ? pl4md initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r r/w r r/w r r/w bit: 7 6 5 4 3 2 1 0 ? pl3md pl2md1 pl2md0 pl1md1 pl1md0 ? pl0md initial value: 0 0 0 0 0 0 0 0 r/w: r r/w r/w r/w r/w r/w r r/w ? bit 15?reserved: this bit is always read as 0. the write value should always be 0. ? bit 14?pl7 mode bit (pl7md): selects the function of pin pl7/sck2. bit 14: pl7md description 0 general input/output (pl7) (initial value) 1 serial clock input/output (sck2) ? bit 13?reserved: this bit is always read as 0. the write value should always be 0. ? bit 12?pl6 mode bit (pl6md): selects the function of pin pl6/adend. bit 12: pl6md description 0 general input/output (pl6) (initial value) 1 a/d conversion end output (adend) ? bit 11?reserved: this bit is always read as 0. the write value should always be 0. ? bit 10?pl5 mode bit (pl5md): selects the function of pin pl5/ adtrg1 . bit 10: pl5md description 0 general input/output (pl5) (initial value) 1 a/d conversion trigger input ( adtrg1 )
rev. 3.0, 09/04, page 800 of 1086 ? bit 9?reserved: this bit is always read as 0. the write value should always be 0. ? bit 8?pl4 mode bit (pl4md): selects the function of pin pl4/ adtrg0 . bit 8: pl4md description 0 general input/output (pl4) (initial value) 1 a/d conversion trigger input ( adtrg0 ) ? bit 7?reserved: this bit is always read as 0. the write value should always be 0. ? bit 6?pl3 mode bit (pl3md): selects the function of pin pl3/tclkb. bit 6: pl3md description 0 general input/output (pl3) (initial value) 1 atu-ii clock input (tclkb) ? bits 5 and 4?pl2 mode bits 1 and 0 (pl2md1, pl2md0): these bits select the function of pin pl2/tio11b/ irq7 . bit 5: pl2md1 bit 4: pl2md0 description 0 general input/output (pl2) (initial value) 0 1 atu-ii input capture input/output compare output (tio11b) 0 interrupt request input ( irq7 ) 1 1 reserved (do not set) ? bits 3 and 2?pl1 mode bits 1 and 0 (pl1md1, pl1md0): these bits select the function of pin pl1/tio11a/ irq6 . bit 3: pl1md1 bit 2: pl1md0 description 0 general input/output (pl1) (initial value) 0 1 atu-ii input capture input/output compare output (tio11a) 0 interrupt request input ( irq6 ) 1 1 reserved (do not set) ? bit 1?reserved: this bit is always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 801 of 1086 ? bit 0?pl0 mode bit (pl0md): selects the function of pin pl0/ti10. bit 0: pl0md description 0 general input/output (pl0) (initial value) 1 atu-ii edge input (ti10) 21.3.25 port l invert register (plir) bit: 15 14 13 12 11 10 9 8 ??????pl9irpl8ir initial value:00000000 r/w:rrrrrrr/wr/w bit:76543210 pl7ir??????? initial value:00000000 r/w:r/wrrrrrrr the port l invert register (plir) is a 16-bit readable/writable register that sets the port l inversion function. bits pl9ir to pl7ir correspond to pins pl9/sck4/ irq5 to pl7/sck2. plir is enabled when port l pins function as serial clock pins, and disabled otherwise. when port l pins function as serial clock pins, the value of a pin is inverted when the corresponding bit in plir is set to 1. plir is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode. plnir description 0 value is not inverted (initial value) 1 value is inverted n = 9 to 7
rev. 3.0, 09/04, page 802 of 1086
rev. 3.0, 09/04, page 803 of 1086 section 22 i/o ports (i/o) 22.1 overview the sh7058 has 11 ports: a, b, c, d, e, f, g, h, j, k, and l, all supporting both input and output. ports a b, e, f, h, j, and k are 16-bit ports, port c is a 5-bit port, ports d and l are 14-bit ports, and port g is a 4-bit port. all the port pins are multiplexed as general input/output pins and special function pins. the functions of the multiplex pins are selected by means of the pin function controller (pfc). each port is provided with a data register for storing the pin data. each of the ports a, b, d, j, and l is provided with a port register to read the pin values. 22.2 port a port a is an input/output port with the 16 pins shown in figure 22.1. pa15 (i/o) /rxd0 (input) pa14 (i/o) /txd0 (output) pa13 (i/o) /tio5b (i/o) pa12 (i/o) /tio5a (i/o) pa11 (i/o) /tio4d (i/o) /adto1b (output) pa10 (i/o) /tio4c (i/o) /adto1a (output) pa9 (i/o) /tio4b (i/o) /adto0b (output) pa8 (i/o) /tio4a (i/o) /adto0a (output) pa7 (i/o) /tio3d (i/o) pa5 (i/o) /tio3b (i/o) pa4 (i/o) /tio3a (i/o) pa3 (i/o) /tiod (input) pa2 (i/o) /tioc (input) pa1 (i/o) /tiob (input) pa0 (i/o) /tioa (input) pa6 (i/o) /tio3c (i/o) port a figure 22.1 port a
rev. 3.0, 09/04, page 804 of 1086 22.2.1 register configuration the port a register configuration is shown in table 22.1. table 22.1 register configuration name abbreviation r/w initial value address access size port a data register padr r/w h'0000 h'fffff726 8, 16 port a port register papr r port a pin values h'fffff780 8, 16 note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles. 22.2.2 port a data register (padr) bit: 15 14 13 12 11 10 9 8 pa15 dr pa14 dr pa13 dr pa12 dr pa11 dr pa10 dr pa9 dr pa8 dr initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit:76543210 pa7 dr pa6 dr pa5 dr pa4 dr pa3 dr pa2 dr pa1 dr pa0 dr initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the port a data register (padr) is a 16-bit readable/writable register that stores port a data. bits pa15dr to pa0dr correspond to pins pa15/rxd0 to pa0/ti0a. when a pin functions as a general output, if a value is written to padr, that value is output directly from the pin, and if padr is read, the register value is returned directly regardless of the pin state. when a pin functions as a general input, if padr is read, the pin state, not the register value, is returned directly. if a value is written to padr, although that value is written into padr, it does not affect the pin state. table 22.2 summarizes port a data register read/write operations. padr is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode.
rev. 3.0, 09/04, page 805 of 1086 table 22.2 port a data register (padr) read/write operations bits 15 to 0: paior pin function read write general input pin state value is written to padr, but does not affect pin state 0 other than general input pin state value is written to padr, but does not affect pin state general output padr value write value is output from pin 1 other than general output padr value value is written to padr, but does not affect pin state 22.2.3 port a port register (papr) bit: 15 14 13 12 11 10 9 8 pa15pr pa14pr pa13pr pa12pr pa11pr pa10pr pa9pr pa8pr initial value: pa15 pa14 pa13 pa12 pa11 pa10 pa9 pa8 r/w:rrrrrrrr bit:76543210 pa7pr pa6pr pa5pr pa4pr pa3pr pa2pr pa1pr pa0pr initial value: pa7 pa6 pa5 pa4 pa3 pa2 pa1 pa0 r/w:rrrrrrrr the port a port register (papr) is a 16-bit read-only register that always stores the value of the port a pins. the cpu cannot write data to this register. bits pa15pr to pa0pr correspond to pins pa15/rxd0 to pa0/ti0a. if papr is read, the corresponding pin values are returned.
rev. 3.0, 09/04, page 806 of 1086 22.3 port b port b is an input/output port with the 16 pins shown in figure 21.2. pb15 (i/o) /puls5 (output) /sck2 (i/o) pb14 (i/o) /sck1 (i/o) /tclkb (input) /ti10 (input) pb13 (i/o) /sck0 (i/o) pb12 (i/o) /tclka (input) / (output) pb11 (i/o) /rxd4 (input) /hrxd0 (input) /to8h (output) pb10 (i/o) /txd4 (output) /htxd0 (output) /to8g (output) pb9 (i/o) /rxd3 (input) /to8f (output) pb8 (i/o) /txd3 (output) /to8e (output) pb7 (i/o) /to7d (output) /to8d (output) pb5 (i/o) /to7b (output) /to8b (output) pb4 (i/o) /to7a (output) /to8a (output) pb3 (i/o) /to6d (output) pb2 (i/o) /to6c (output) pb1 (i/o) /to6b (output) pb0 (i/o) /to6a (output) pb6 (i/o) /to7c (output) /to8c (output) port b figure 22.2 port b 22.3.1 register configuration the port b register configuration is shown in table 22.3. table 22.3 register configuration name abbreviation r/w initial value address access size port b data register pbdr r/w h'0000 h'fffff738 8, 16 port b port register pbpr r port b pin values h'fffff782 8, 16 note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles.
rev. 3.0, 09/04, page 807 of 1086 22.3.2 port b data register (pbdr) bit: 15 14 13 12 11 10 9 8 pb15 dr pb14 dr pb13 dr pb12 dr pb11 dr pb10 dr pb9 dr pb8 dr initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit:76543210 pb7 dr pb6 dr pb5 dr pb4 dr pb3 dr pb2 dr pb1 dr pb0 dr initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the port b data register (pbdr) is a 16-bit readable/writable register that stores port b data. bits pb15dr to pb0dr correspond to pins pb15/puls5/sck2 to pb0/to6a. when a pin functions as a general output, if a value is written to pbdr, that value is output directly from the pin, and if pbdr is read, the register value is returned directly regardless of the pin state. when a pin functions as a general input, if pbdr is read, the pin state, not the register value, is returned directly. if a value is written to pbdr, although that value is written into pbdr, it does not affect the pin state. table 22.4 summarizes port b data register read/write operations. pbdr is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode. table 22.4 port b data register (pbdr) read/write operations bits 15 to 0: pbior pin function read write general input pin state value is written to pbdr, but does not affect pin state 0 other than general input pin state value is written to pbdr, but does not affect pin state general output pbdr value write value is output from pin 1 other than general output pbdr value value is written to pbdr, but does not affect pin state
rev. 3.0, 09/04, page 808 of 1086 22.3.3 port b port register (pbpr) bit: 15 14 13 12 11 10 9 8 pb15pr pb14pr pb13pr pb12pr pb11pr pb10pr pb9pr pb8pr initial value: pb15 pb14 pb13 pb12 pb11 pb10 pb9 pb8 r/w:rrrrrrrr bit:76543210 pb7pr pb6pr pb5pr pb4pr pb3pr pb2pr pb1pr pb0pr initial value: pb7 pb6 pb5 pb4 pb3 pb2 pb1 pb0 r/w:rrrrrrrr the port b port register (pbpr) is a 16-bit read-only register that always stores the value of the port b pins. the cpu cannot write data to this register. bits pb15pr to pb0pr correspond to pins pb15/puls5/sck2 to pb0/to6a. if pbpr is read, the corresponding pin values are returned. 22.4 port c port c is an input/output port with the five pins shown in figure 22.3. pc4 (i/o) / (input) pc3 (i/o) /rxd2 (input) pc2 (i/o) /txd2 (output) pc1 (i/o) /rxd1 (input) pc0 (i/o) /txd1 (output) port c figure 22.3 port c 22.4.1 register configuration the port c register configuration is shown in table 22.5. table 22.5 register configuration name abbreviation r/w initial value address access size port c data register pcdr r/w h'0000 h'fffff73e 8, 16 note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles.
rev. 3.0, 09/04, page 809 of 1086 22.4.2 port c data register (pcdr) bit: 15 14 13 12 11 10 9 8 ???????? initial value:00000000 r/w:rrrrrrrr bit:76543210 ???pc4 dr pc3 dr pc2 dr pc1 dr pc0 dr initial value:00000000 r/w: r r r r/w r/w r/w r/w r/w the port c data register (pcdr) is a 16-bit readable/writable register that stores port c data. bits pc4dr to pc0dr correspond to pins pc4/ irq0 to pc0/txd1. when a pin functions as a general output, if a value is written to pcdr, that value is output directly from the pin, and if pcdr is read, the register value is returned directly regardless of the pin state. when a pin functions as a general input, if pcdr is read, the pin state, not the register value, is returned directly. if a value is written to pcdr, although that value is written into pcdr, it does not affect the pin state. table 22.6 summarizes port c data register read/write operations. pcdr is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode. ? bits 15 to 5?reserved: these bits are always read as 0. the write value should always be 0. table 22.6 port c data register (pcdr) read/write operations bits 4 to 0: pcior pin function read write general input pin state value is written to pcdr, but does not affect pin state 0 other than general input pin state value is written to pcdr, but does not affect pin state general output pcdr value write value is output from pin 1 other than general output pcdr value value is written to pcdr, but does not affect pin state
rev. 3.0, 09/04, page 810 of 1086 22.5 port d port d is an input/output port with the 14 pins shown in figure 22.4. pd13 (i/o) /puls6 (output) / htxd0 (output) /htxd1 (output) pd12 (i/o) /puls4 (output) pd11 (i/o) /puls3 (output) pd10 (i/o) /puls2 (output) pd9 (i/o) /puls1 (output) pd8 (i/o) /puls0 (output) pd7 (i/o) /tio1h (i/o) pd6 (i/o) /tio1g (i/o) pd5 (i/o) /tio1f (i/o) pd3 (i/o) /tio1d (i/o) pd2 (i/o) /tio1c (i/o) pd1 (i/o) /tio1b (i/o) pd0 (i/o) /tio1a (i/o) pd4 (i/o) /tio1e (i/o) port d figure 22.4 port d 22.5.1 register configuration the port d register configuration is shown in table 22.7. table 22.7 register configuration name abbreviation r/w initial value address access size port d data register pddr r/w h'0000 h'fffff746 8, 16 port d port register pdpr r port d pin values h'fffff784 8, 16 note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles.
rev. 3.0, 09/04, page 811 of 1086 22.5.2 port d data register (pddr) bit: 15 14 13 12 11 10 9 8 ? ? pd13 dr pd12 dr pd11 dr pd10 dr pd9 dr pd8 dr initial value: 0 0 0 0 0 0 0 0 r/w: r r r/w r/w r/w r/w r/w r/w bit: 7 6 5 4 3 2 1 0 pd7 dr pd6 dr pd5 dr pd4 dr pd3 dr pd2 dr pd1 dr pd0 dr initial value: 0 0 0 0 0 0 0 0 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the port d data register (pddr) is a 16-bit readable/writable register that stores port d data. bits pd13dr to pd0dr correspond to pins pd13/puls6/htxd0/htxd1 to pd0/tio1a. when a pin functions as a general output, if a value is written to pddr, that value is output directly from the pin, and if pddr is read, the register value is returned directly regardless of the pin state. when a pin functions as a general input, if pddr is read, the pin state, not the register value, is returned directly. if a value is written to pddr, although that value is written into pddr, it does not affect the pin state. table 22.8 summarizes port d data register read/write operations. pddr is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode. ? bits 15 and 14? reserved: these bits are always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 812 of 1086 table 22.8 port d data register (pddr) read/write operations bits 13 to 0: pdior pin function read write general input pin state value is written to pddr, but does not affect pin state 0 other than general input pin state value is written to pddr, but does not affect pin state general output pddr value write value is output from pin 1 other than general output pddr value value is written to pddr, but does not affect pin state 22.5.3 port d port register (pdpr) bit: 15 14 13 12 11 10 9 8 pd15pr pd14pr pd13pr pd12pr pd11pr pd10pr pd9pr pd8pr initial value: pd15 pd14 pd13 pd12 pd11 pd10 pd9 pd8 r/w:rrrrrrrr bit:76543210 pd7pr pd6pr pd5pr pd4pr pd3pr pd2pr pd1pr pd0pr initial value: pd7 pd6 pd5 pd4 pd3 pd2 pd1 pd0 r/w:rrrrrrrr the port d port register (pdpr) is a 16-bit read-only register that always stores the value of the port d pins. the cpu cannot write data to this register. bits pd13pr to pd0pr correspond to pins pd13/puls6/htxd0/htxd1 to pd0/tio1a. if pdpr is read, the corresponding pin values are returned.
rev. 3.0, 09/04, page 813 of 1086 22.6 port e port e is an input/output port with the 16 pins shown in figure 22.5. a15 (output) a14 (output) a13 (output) a12 (output) a11 (output) a10 (output) a9 (output) a8 (output) a7 (output) a5 (output) a4 (output) a3 (output) a2 (output) a1 (output) a0 (output) a6 (output) port e pe15 (i/o) /a15 (output) pe14 (i/o) /a14 (output) pe13 (i/o) /a13 (output) pe12 (i/o) /a12 (output) pe11 (i/o) /a11 (output) pe10 (i/o) /a10 (output) pe9 (i/o) /a9 (output) pe8 (i/o) /a8 (output) pe7 (i/o) /a7 (output) pe5 (i/o) /a5 (output) pe4 (i/o) /a4 (output) pe3 (i/o) /a3 (output) pe2 (i/o) /a2 (output) pe1 (i/o) /a1 (output) pe0 (i/o) /a0 (output) pe6 (i/o) /a6 (output) pe15 (i/o) rom disabled expansion mode rom enabled expansion mode single- chip mode pe14 (i/o) pe13 (i/o) pe12 (i/o) pe11 (i/o) pe10 (i/o) pe9 (i/o) pe8 (i/o) pe7 (i/o) pe5 (i/o) pe4 (i/o) pe3 (i/o) pe2 (i/o) pe1 (i/o) pe0 (i/o) pe6 (i/o) figure 22.5 port e 22.6.1 register configuration the port e register configuration is shown in table 22.9. table 22.9 register configuration name abbreviation r/w initial value address access size port e data register pedr r/w h'0000 h'fffff754 8, 16 note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles.
rev. 3.0, 09/04, page 814 of 1086 22.6.2 port e data register (pedr) bit: 15 14 13 12 11 10 9 8 pe15 dr pe14 dr pe13 dr pe12 dr pe11 dr pe10 dr pe9 dr pe8 dr initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit:76543210 pe7 dr pe6 dr pe5 dr pe4 dr pe3 dr pe2 dr pe1 dr pe0 dr initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the port e data register (pedr) is a 16-bit readable/writable register that stores port e data. bits pe15dr to pe0dr correspond to pins pe15/a15 to pe0/a0. when a pin functions as a general output, if a value is written to pedr, that value is output directly from the pin, and if pedr is read, the register value is returned directly regardless of the pin state. when the pod pin is driven low, general outputs go to the high-impedance state regardless of the pedr value. when the pod pin is driven high, the written value is output from the pin. when a pin functions as a general input, if pedr is read, the pin state, not the register value, is returned directly. if a value is written to pedr, although that value is written into pedr, it does not affect the pin state. table 22.10 summarizes port e data register read/write operations. pedr is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode.
rev. 3.0, 09/04, page 815 of 1086 table 22.10 port e data register (pedr) read/write operations bits 15 to 0: peior pin function read write general input pin state value is written to pedr, but does not affect pin state 0 other than general input pin state value is written to pedr, but does not affect pin state write value is output from pin ( pod pin = high) general output pedr value high impedance regardless of pedr value ( pod pin = low) 1 other than general output pedr value value is written to pedr, but does not affect pin state
rev. 3.0, 09/04, page 816 of 1086 22.7 port f port f is an input/output port with the 16 pins shown in figure 22.6. pf15 (i/o) pf14 (i/o) pf13 (i/o) pf12 (i/o) pf11 (i/o) pf10 (i/o) pf9 (i/o) pf8 (i/o) pf7 (i/o) a21 (output) a20 (output) a19 (output) a18 (output) a17 (output) pf6 (i/o) port f (input) (output) (output) (output) (output) (output) (output) (input) (output) pf5 (i/o) /a21 (output) / (input) pf4 (i/o) /a20 (output) pf3 (i/o) /a19 (output) pf2 (i/o) /a18 (output) pf1 (i/o) /a17 (output) (output) pf15 (i/o) rom disabled expansion mode rom enabled expansion mode single- chip mode pf14 (i/o) pf13 (i/o) pf12 (i/o) pf11 (i/o) pf10 (i/o) pf9 (i/o) pf8 (i/o) pf7 (i/o) pf5 (i/o) / (input) pf4 (i/o) pf3 (i/o) pf2 (i/o) pf1 (i/o) a16 (output) pf0 (i/o) /a16 (output) pf0 (i/o) pf6 (i/o) figure 22.6 port f 22.7.1 register configuration the port f register configuration is shown in table 22.11. table 22.11 register configuration name abbreviation r/w initial value address access size port f data register pfdr r/w h'0000 h'fffff74e 8, 16 note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles.
rev. 3.0, 09/04, page 817 of 1086 22.7.2 port f data register (pfdr) bit: 15 14 13 12 11 10 9 8 pf15 dr pf14 dr pf13 dr pf12 dr pf11 dr pf10 dr pf9 dr pf8 dr initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit:76543210 pf7 dr pf6 dr pf5 dr pf4 dr pf3 dr pf2 dr pf1 dr pf0 dr initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the port f data register (pfdr) is a 16-bit readable/writable register that stores port f data. bits pf15dr to pf0dr correspond to pins pf15/ breq to pf0/a16. when a pin functions as a general output, if a value is written to pfdr, that value is output directly from the pin, and if pfdr is read, the register value is returned directly regardless of the pin state. for pins pf0 to pf4, when the pod pin is driven low, general outputs go to the high- impedance state regardless of the pfdr value. when the pod pin is driven high, the written value is output from the pin. when a pin functions as a general input, if pfdr is read, the pin state, not the register value, is returned directly. if a value is written to pfdr, although that value is written into pfdr, it does not affect the pin state. table 22.12 summarizes port f data register read/write operations. pfdr is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode.
rev. 3.0, 09/04, page 818 of 1086 table 22.12 port f data register (pfdr) read/write operations bits 15 to 5: pfior pin function read write general input pin state value is written to pfdr, but does not affect pin state 0 other than general input pin state value is written to pfdr, but does not affect pin state general output pfdr value write value is output from pin 1 other than general output pfdr value value is written to pfdr, but does not affect pin state bits 4 to 0: pfior pin function read write general input pin state value is written to pfdr, but does not affect pin state 0 other than general input pin state value is written to pfdr, but does not affect pin state general output pfdr value write value is output from pin ( pod pin = high) high impedance regardless of pfdr value ( pod pin = low) 1 other than general output pfdr value value is written to pfdr, but does not affect pin state 22.8 port g port g is an input/output port with the four pins shown in figure 22.7. pg3 (i/o) / (input) / (input) pg2 (i/o) / (input) /adend (output) pg1 (i/o) / (input) pg0 (i/o) /puls7 (output) /hrxd0 (input) /hrxd1 (input) port g figure 22.7 port g
rev. 3.0, 09/04, page 819 of 1086 22.8.1 register configuration the port g register configuration is shown in table 22.13. table 22.13 register configuration name abbreviation r/w initial value address access size port g data register pgdr r/w h'0000 h'fffff764 8, 16 note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles. 22.8.2 port g data register (pgdr) bit: 15 14 13 12 11 10 9 8 ???????? initial value:00000000 r/w:rrrrrrrr bit:76543210 ????pg3 dr pg2 dr pg1 dr pg0 dr initial value:00000000 r/w:rrrrr/wr/wr/wr/w the port g data register (pgdr) is a 16-bit readable/writable register that stores port g data. bits pg3dr to pg0dr correspond to pins pg3/ irq3 / adtrg0 to pg0/puls7/hrxd0/hrxd1. when a pin functions as a general output, if a value is written to pgdr, that value is output directly from the pin, and if pgdr is read, the register value is returned directly regardless of the pin state. when a pin functions as a general input, if pgdr is read, the pin state, not the register value, is returned directly. if a value is written to pgdr, although that value is written into pgdr, it does not affect the pin state. table 22.14 summarizes port g data register read/write operations. pgdr is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode. ? bits 15 to 4?reserved: these its are always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 820 of 1086 table 22.14 port g data register (pgdr) read/write operations bits 3 to 0: pgior pin function read write general input pin state value is written to pgdr, but does not affect pin state 0 other than general input pin state value is written to pgdr, but does not affect pin state general output pgdr value write value is output from pin 1 other than general output pgdr value value is written to pgdr, but does not affect pin state
rev. 3.0, 09/04, page 821 of 1086 22.9 port h port h is an input/output port with the 16 pins shown in figure 22.8. ph15 (i/o) / d15 (i/o) ph14 (i/o) / d14 (i/o) ph13 (i/o) / d13 (i/o) ph12 (i/o) / d12 (i/o) ph11 (i/o) / d11 (i/o) ph10 (i/o) / d10 (i/o) ph9 (i/o) / d9 (i/o) ph8 (i/o) / d8 (i/o) d7 (i/o) d5 (i/o) d4 (i/o) d3 (i/o) d2 (i/o) d1 (i/o) d6 (i/o) d15 (i/o) d14 (i/o) d13 (i/o) d12 (i/o) d11 (i/o) d10 (i/o) d9 (i/o) d8 (i/o) port h ph15 (i/o) (area 0: 8 bits) rom disabled expansion mode (area 0: 16 bits) single- chip mode ph14 (i/o) ph13 (i/o) ph12 (i/o) ph11 (i/o) ph10 (i/o) ph9 (i/o) ph8 (i/o) ph7 (i/o) ph5 (i/o) ph4 (i/o) ph3 (i/o) ph2 (i/o) ph1 (i/o) d0 (i/o) ph0 (i/o) ph6 (i/o) ph15 (i/o) / d15 (i/o) rom enabled expansion mode ph14 (i/o) / d14 (i/o) ph13 (i/o) / d13 (i/o) ph12 (i/o) / d12 (i/o) ph11 (i/o) / d11 (i/o) ph10 (i/o) / d10 (i/o) ph9 (i/o) / d9 (i/o) ph8 (i/o) / d8 (i/o) ph7 (i/o) / d7 (i/o) ph5 (i/o) / d5 (i/o) ph4 (i/o) / d4 (i/o) ph3 (i/o) / d3 (i/o) ph2 (i/o) / d2 (i/o) ph1 (i/o) / d1 (i/o) ph0 (i/o) / d0 (i/o) ph6 (i/o) / d6 (i/o) figure 22.8 port h
rev. 3.0, 09/04, page 822 of 1086 22.9.1 register configuration the port h register configuration is shown in table 22.15. table 22.15 register configuration name abbreviation r/w initial value address access size port h data register phdr r/w h'0000 h'fffff72c 8, 16 note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles. 22.9.2 port h data register (phdr) bit: 15 14 13 12 11 10 9 8 ph15 dr ph14 dr ph13 dr ph12 dr ph11 dr ph10 dr ph9 dr ph8 dr initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit:76543210 ph7 dr ph6 dr ph5 dr ph4 dr ph3 dr ph2 dr ph1 dr ph0 dr initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the port h data register (phdr) is a 16-bit readable/writable register that stores port h data. bits ph15dr to ph0dr correspond to pins ph15/d15 to ph0/d0. when a pin functions as a general output, if a value is written to phdr, that value is output directly from the pin, and if phdr is read, the register value is returned directly regardless of the pin state. when the pod pin is driven low, general outputs go to the high-impedance state regardless of the phdr value. when the pod pin is driven high, the written value is output from the pin. when a pin functions as a general input, if phdr is read, the pin state, not the register value, is returned directly. if a value is written to phdr, although that value is written into phdr, it does not affect the pin state. table 22.16 summarizes port h data register read/write operations. phdr is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode.
rev. 3.0, 09/04, page 823 of 1086 table 22.16 port h data register (phdr) read/write operations bits 15 to 0: phior pin function read write general input pin state value is written to phdr, but does not affect pin state 0 other than general input pin state value is written to phdr, but does not affect pin state write value is output from pin ( pod pin = high) general output phdr value high impedance regardless of phdr value ( pod pin = low) 1 other than general output phdr value value is written to phdr, but does not affect pin state 22.10 port j port j is an input/output port with the 16 pins shown in figure 22.9. pj15 (i/o) /ti9f (input) pj14 (i/o) /ti9e (input) pj13 (i/o) /ti9d (input) pj12 (i/o) /ti9c (input) pj11 (i/o) /ti9b (input) pj10 (i/o) /ti9a (input) pj9 (i/o) /tio5d (i/o) pj8 (i/o) /tio5c (i/o) pj7 (i/o) /tio2h (i/o) pj5 (i/o) /tio2f (i/o) pj4 (i/o) /tio2e (i/o) pj3 (i/o) /tio2d (i/o) pj2 (i/o) /tio2c (i/o) pj1 (i/o) /tio2b (i/o) pj0 (i/o) /tio2a (i/o) pj6 (i/o) /tio2g (i/o) port j figure 22.9 port j
rev. 3.0, 09/04, page 824 of 1086 22.10.1 register configuration the port j register configuration is shown in table 22.17. table 22.17 register configuration name abbreviation r/w initial value address access size port j data register pjdr r/w h'0000 h'fffff76c 8, 16 port j port register pjpr r port j pin values h'fffff786 8, 16 note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles. 22.10.2 port j data register (pjdr) bit: 15 14 13 12 11 10 9 8 pj15 dr pj14 dr pj13 dr pj12 dr pj11 dr pj10 dr pj9 dr pj8 dr initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit:76543210 pj7 dr pj6 dr pj5 dr pj4 dr pj3 dr pj2 dr pj1 dr pj0 dr initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the port j data register (pjdr) is a 16-bit readable/writable register that stores port j data. bits pj15dr to pj0dr correspond to pins pj15/ti9f to pj0/tio2a. when a pin functions as a general output, if a value is written to pjdr, that value is output directly from the pin, and if pjdr is read, the register value is returned directly regardless of the pin state. when a pin functions as a general input, if pjdr is read, the pin state, not the register value, is returned directly. if a value is written to pjdr, although that value is written into pjdr, it does not affect the pin state. table 22.18 summarizes port j data register read/write operations. pjdr is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode.
rev. 3.0, 09/04, page 825 of 1086 table 22.18 port j data register (pjdr) read/write operations bits 15 to 0: pjior pin function read write general input pin state value is written to pjdr, but does not affect pin state 0 other than general input pin state value is written to pjdr, but does not affect pin state general output pjdr value write value is output from pin 1 other than general output pjdr value value is written to pjdr, but does not affect pin state 22.10.3 port j port register (pjpr) bit: 15 14 13 12 11 10 9 8 pj15pr pj14pr pj13pr pj12pr pj11pr pj10pr pj9pr pj8pr initial value: pj15 pj14 pj13 pj12 pj11 pj10 pj9 pj8 r/w:rrrrrrrr bit:76543210 pj7pr pj6pr pj5pr pj4pr pj3pr pj2pr pj1pr pj0pr initial value: pj7 pj6 pj5 pj4 pj3 pj2 pj1 pj0 r/w:rrrrrrrr the port j port register (pjpr) is a 16-bit read-only register that always stores the value of the port j pins. the cpu cannot write data to this register. bits pj15pr to pj0pr correspond to pins pj15/ti9f to pj0/tio2a. if pjpr is read, the corresponding pin values are returned.
rev. 3.0, 09/04, page 826 of 1086 22.11 port k port k is an input/output port with the 16 pins shown in figure 22.10. pk15 (i/o) /to8p (output) pk14 (i/o) /to8o (output) pk13 (i/o) /to8n (output) pk12 (i/o) /to8m (output) pk11 (i/o) /to8l (output) pk10 (i/o) /to8k (output) pk9 (i/o) /to8j (output) pk8 (i/o) /to8i (output) pk7 (i/o) /to8h (output) pk5 (i/o) /to8f (output) pk4 (i/o) /to8e (output) pk3 (i/o) /to8d (output) pk2 (i/o) /to8c (output) pk1 (i/o) /to8b (output) pk0 (i/o) /to8a (output) pk6 (i/o) /to8g (output) port k figure 21.10 port k 22.11.1 register configuration the port k register configuration is shown in table 22.19. table 22.19 register configuration name abbreviation r/w initial value address access size port k data register pkdr r/w h'0000 h'fffff778 8, 16 note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles.
rev. 3.0, 09/04, page 827 of 1086 22.11.2 port k data register (pkdr) bit: 15 14 13 12 11 10 9 8 pk15 dr pk14 dr pk13 dr pk12 dr pk11 dr pk10 dr pk9 dr pk8 dr initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w bit:76543210 pk7 dr pk6 dr pk5 dr pk4 dr pk3 dr pk2 dr pk1 dr pk0 dr initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the port k data register (pkdr) is a 16-bit readable/writable register that stores port k data. bits pk15dr to pk0dr correspond to pins pk15/to8p to pk0/to8a. when a pin functions as a general output, if a value is written to pkdr, that value is output directly from the pin, and if pkdr is read, the register value is returned directly regardless of the pin state. when a pin functions as a general input, if pkdr is read, the pin state, not the register value, is returned directly. if a value is written to pkdr, although that value is written into pkdr, it does not affect the pin state. table 22.20 summarizes port k data register read/write operations. pkdr is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode. table 22.20 port k data register (pkdr) read/write operations bits 15 to 0: pkior pin function read write general input pin state value is written to pkdr, but does not affect pin state 0 other than general input pin state value is written to pkdr, but does not affect pin state general output pkdr value write value is output from pin 1 other than general output pkdr value value is written to pkdr, but does not affect pin state
rev. 3.0, 09/04, page 828 of 1086 22.12 port l port l is an input/output port with the 14 pins shown in figure 22.11. pl13 (i/o) / (output) pl12 (i/o) / (input) pl11 (i/o) /hrxd0 (input) /hrxd1 (input) pl10 (i/o) /htxd0 (output) /htxd1 (output) pl9 (i/o) /sck4 (i/o) / (input) pl8 (i/o) /sck3 (i/o) pl7 (i/o) /sck2 (i/o) pl5 (i/o) / (input) pl4 (i/o) / (input) pl3 (i/o) /tclkb (i/o) pl2 (i/o) /tio11b (i/o) / (input) pl1 (i/o) /tio11a (i/o) / (input) pl0 (i/o) /ti10 (input) pl6 (i/o) /adend (output) port l figure 22.11 port l 22.12.1 register configuration the port l register configuration is shown in table 22.21. table 22.21 register configuration name abbreviation r/w initial value address access size port l data register pldr r/w h'0000 h'fffff75e 8, 16 port l port register plpr r port l pin values h'fffff788 8, 16 note: register access with an internal clock multiplication ratio of 4 requires four or five internal clock ( ) cycles.
rev. 3.0, 09/04, page 829 of 1086 22.12.2 port l data register (pldr) bit: 15 14 13 12 11 10 9 8 ? ? pl13 dr pl12 dr pl11 dr pl10 dr pl9 dr pl8 dr initial value:00000000 r/w: r r r/w r/w r/w r/w r/w r/w bit:76543210 pl7 dr pl6 dr pl5 dr pl4 dr pl3 dr pl2 dr pl1 dr pl0 dr initial value:00000000 r/w: r/w r/w r/w r/w r/w r/w r/w r/w the port l data register (pldr) is a 16-bit readable/writable register that stores port l data. bits pl13dr to pl0dr correspond to pins pl13/ irqout to pl0/ti10. when a pin functions as a general output, if a value is written to pldr, that value is output directly from the pin, and if pldr is read, the register value is returned directly regardless of the pin state. when a pin functions as a general input, if pldr is read, the pin state, not the register value, is returned directly. if a value is written to pldr, although that value is written into pldr, it does not affect the pin state. table 22.22 summarizes port l data register read/write operations. pldr is initialized to h'0000 by a power-on reset (excluding a wdt power-on reset), and in hardware standby mode. it is not initialized in software standby mode or sleep mode. ? bits 15 and 14?reserved: these bits are always read as 0. the write value should always be 0.
rev. 3.0, 09/04, page 830 of 1086 table 22.22 port l data register (pldr) read/write operations bits 13 to 0: plior pin function read write general input pin state value is written to pldr, but does not affect pin state 0 other than general input pin state value is written to pldr, but does not affect pin state general output pldr value write value is output from pin 1 other than general output pldr value value is written to pldr, but does not affect pin state 22.12.3 port l port register (plpr) bit: 15 14 13 12 11 10 9 8 pl15pr pl14pr pl13pr pl12pr pl11pr pl10pr pl9pr pl8pr initial value: pl15 pl14 pl13 pl12 pl11 pl10 pl9 pl8 r/w:rrrrrrrr bit:76543210 pl7pr pl6pr pl5pr pl4pr pl3pr pl2pr pl1pr pl0pr initial value: pl7 pl6 pl5 pl4 pl3 pl2 pl1 pl0 r/w:rrrrrrrr the port l port register (plpr) is a 16-bit read-only register that always stores the value of the port l pins. the cpu cannot write data to this register. bits pl13pr to pl0pr correspond to pins pl13/ irqout to pl0/ti10. if plpr is read, the corresponding pin values are returned.
rev. 3.0, 09/04, page 831 of 1086 22.13 pod (port output disable) control the output port drive buffers for the address bus pins (a20 to a0) and data bus pins (d15 to d0) can be controlled by the pod (port output disable) pin input level. however, this function is enabled only when the address bus pins (a20 to a0) and data bus pins (d15 to d0) are designated as general output ports. output buffer control by means of pod is performed asynchronously from bus cycles. pod pod pod pod address bus pins (a20 to a0) and data bus pins (d15 to d0) (when designated as output ports) 0 enabled (high-impedance) 1 disabled (general output)
rev. 3.0, 09/04, page 832 of 1086
rev. 3.0, 09/04, page 833 of 1086 section 23 rom 23.1 features this lsi has 1-mbyte on-chip flash memory. the flash memory has the following features. ? two flash-memory mats according to lsi initiation mode the on-chip flash memory has two memory spaces in the same address space (hereafter referred to as memory mats). the mode setting in the initiation determines which memory mat is initiated first. the mat can be switched by using the bank-switching method after initiation. ? the user mat is initiated at a power-on reset in user mode: 1 mbyte ? the user boot mat is initiated at a power-on reset in user boot mode: 8 kbytes ? three on-board programming modes and one off-board programming mode ? on-board programming modes boot mode : this mode is a program mode that uses an on-chip sci interface. the user mat and user boot mat can be programmed. this mode can automatically adjust the bit rate between the host and this lsi. user program mode : the user mat can be programmed by using the optional interface. user boot mode : the user boot program of the optional interface can be made and the user mat can be programmed. ? off-board programming mode programmer mode: this mode uses the prom programmer. the user mat and user boot mat can be programmed. ? programming/erasing interface by the download of on-chip program this lsi has a dedicated programming/erasing program. after downloading this program to the on-chip ram, programming/erasing can be performed by setting the argument parameter. the user branch is also supported. ? user branch the program processing is performed in 128-byte units. it consists the program pulse application, verify read, and several other steps. erasing is performed in one divided-block units and consists of several steps. the user processing routine can be executed between the steps, this setting for which is called the user branch addition. ? emulation function of flash memory by using the on-chip ram as flash memory is overlapped with part of the on-chip ram, the flash memory programming can be emulated in real time. ? protection modes there are two protection modes. software protection by the register setting and hardware protection by the fwe pin. the protection state for flash memory programming/erasing can be set.
rev. 3.0, 09/04, page 834 of 1086 when abnormalities, such as runaway of programming/erasing are detected, these modes enter the error protection state and the programming/erasing processing is suspended. ? programming/erasing time the flash memory programming time is t p ms (typ) in 128-byte simultaneous programming and t p /128 ms per byte. the erasing time is t e s (typ) per block. ? number of programming the number of flash memory programming can be up to n wec times. ? operating frequency at programming/erasing the operating frequency at programming/erasing is a maximum of 40 mhz.
rev. 3.0, 09/04, page 835 of 1086 23.2 overview 23.2.1 block diagram fccs fpcs fecs fkey fmats ftdar ramer control unit memory mat unit flash memory user mat: 1 mbyte user boot mat: 8 kbytes operating mode module bus fwe pin mode pins internal address bus internal data bus (32 bits) legend fccs: flash code control and status register fpcs: flash program code select register fecs: flash erase code select register fkey: flash key code register fmats: flash mat select register ftdar: flash transfer destination address register ramer: ram emulation register figure 23.1 block diagram of flash memory
rev. 3.0, 09/04, page 836 of 1086 23.2.2 operating mode when each mode pin and the fwe pin are set in the reset state and the reset signal is released, the microcomputer enters each operating mode as shown in figure 23.2. for the setting of each mode pin and the fwe pin, see table 23.1. ? flash memory cannot be read, programmed, or erased in rom invalid mode. the programming/erasing interface registers cannot be written to. when these registers are read, h'00 is always read. ? flash memory can be read in user mode, but cannot be programmed or erased. ? flash memory can be read, programmed, or erased on the board only in user program mode, user boot mode, and boot mode. ? flash memory can be read, programmed, or erased by means of the prom programmer in programmer mode. reset state rom invalid mode prom mode user mode user program mode user boot mode boot mode on-board programming mode fwe=0 ram emulation is enabled fwe=1 =0 rom invalid mode setting =0 user mode setting =0 user program mode setting u ser boot m ode setting =0 boot mode setting =0 =0 programmer mode setting figure 23.2 mode transition of flash memory
rev. 3.0, 09/04, page 837 of 1086 table 23.1 relationship between fwe and md pins and operating modes mode pin reset state rom invalid mode rom valid mode user program mode user boot mode boot mode program- mer mode res 0 1 1 1 1 1 1 fwe 0/1 0 0 1 1 1 0/1 md0 0/1 0/1 * 1 0/1 * 2 0/1 * 2 0/1 * 2 0/1 * 2 1 md1 0/1 0 1 1 0 0 1 md2 0/1 1 1 1 0 1 0 notes: 1. md0 = 0: 8-bit external bus, md0 = 1: 16-bit external bus 2. md0 = 0: external bus can be used, md0 = 1: single-chip mode (external bus cannot be used)
rev. 3.0, 09/04, page 838 of 1086 23.2.3 mode comparison the comparison table of programming and erasing related items about boot mode, user program mode, user boot mode, and programmer mode is shown in table 23.2. table 23.2 comparison of programming modes boot mode user program mode user boot mode programmer mode programming/ erasing environment on-board programming on-board programming on-board programming off-board programming programming/ erasing enable mat user mat user boot mat user mat user mat user mat user boot mat programming/ erasing control command method programming/ erasing interface programming/ erasing interface command method all erasure o (automatic) o o o (automatic) block division erasure o * 1 oox program data transfer from host via sci from optional device via ram from optional device via ram via programmer user branch function x oox ram emulation x o x x reset initiation mat embedded program storage mat user mat user boot mat * 2 embedded program storage mat transition to user mode mode setting change and reset fwe setting change mode setting change and reset ? notes: 1. all-erasure is performed. after that, the specified block can be erased. 2. initiation starts from the embedded program storage mat. after checking the flash- memory related registers, initiation starts from the reset vector of the user mat. ? the user boot mat can be programmed or erased only in boot mode and programmer mode. ? the user mat and user boot mat are all erased in boot mode. then, the user mat and user boot mat can be programmed by means of the command method. however, the contents of the mat cannot be read until this state. only user boot mat is programmed and the user mat is programmed in user boot mode or only user mat is programmed because user boot mode is not used. ? in user boot mode, the boot operation of the optional interface can be performed by a mode pin setting different from user program mode.
rev. 3.0, 09/04, page 839 of 1086 23.2.4 flash memory configuration this lsi's flash memory is configured by the 1-mbyte user mat and 8-kbyte user boot mat. the start address is allocated to the same address in the user mat and user boot mat. therefore, when the program execution or data access is performed between the two mats, the mat must be switched by using fmats. the user mat is divided into two 512-kbyte banks (bank 0 and bank 1). the user mat or user boot mat can be read in all modes if it is in rom valid mode. however, the user boot mat can be programmed only in boot mode and programmer mode. address h'00,0000 address h'07,ffff address h'08,0000 address h'0f,ffff address h'00,0000 address h'00,1fff 512 kbytes 512 kbytes bank 1 bank 0 8 kbytes figure 23.3 flash memory configuration the user mat and user boot mat have different memory sizes. do not access a user boot mat that is 8 kbytes or more. when a user boot mat exceeding 8 kbytes is read from, an undefined value is read.
rev. 3.0, 09/04, page 840 of 1086 23.2.5 block division the user mat is divided into 128 kbytes (seven blocks), 96 kbytes (one block), and 4 kbytes (eight blocks) as shown in figure 23.4. the user mat can be erased in this divided-block units and the erase-block number of eb0 to eb15 is specified when erasing. the ram emulation can be performed in the eight blocks of 4 kbytes. address h'00,0000 address h'07,ffff 512 kbytes address h'08,0000 address h'0f,ffff 512 kbytes 4 kbytes 8 erase block erase block note: * ram emulation can be performed in the eight blocks of 4 kbytes. 128 kbytes 96 kbytes 128 kbytes 128 kbytes eb0 eb7 eb8 eb9 eb10 eb11 128 kbytes 128 kbytes 128 kbytes 128 kbytes eb12 eb13 eb14 eb15 to * figure 23.4 block division of user mat
rev. 3.0, 09/04, page 841 of 1086 23.2.6 programming/erasing interface programming/erasing is executed by downloading the on-chip program to the on-chip ram and specifying the program address/data and erase block by using the interface registers/parameters. the procedure program is made by the user in user program mode and user boot mode. the overview of the procedure is as follows. for details, see section 23.5.2, user program mode. download on-chip program by setting vbr, fkey, and sco bits. initialization execution (on-chip program execution) select on-chip program to be downloaded and set download destination programming (in 128-byte units) or erasing (in one-block units) (on-chip program execution) start user procedure program for programming/erasing. end user procedure program programming/ erasing completed? no yes figure 23.5 overview of user procedure program (1) selection of on-chip program to be downloaded and setting of download destination this lsi has programming/erasing programs and they can be downloaded to the on-chip ram. the on-chip program to be downloaded is selected by setting the corresponding bits in the programming/erasing interface registers. the download destination can be specified by ftdar.
rev. 3.0, 09/04, page 842 of 1086 (2) download of on-chip program the on-chip program is automatically downloaded by clearing vbr of the cpu to h'00000000 and then setting the sco bit in the flash key code register (fkey) and the flash code control and status register (fccs), which are programming/erasing interface registers. the user mat is replaced to the embedded program storage area when downloading. since the flash memory cannot be read when programming/erasing, the procedure program, which is working from download to completion of programming/erasing, must be executed in a space other than the flash memory to be programmed/erased (for example, on-chip ram). since the result of download is returned to the programming/erasing interface parameters, whether the normal download is executed or not can be confirmed. note that vbr can be changed after download is completed. (3) initialization of programming/erasing the operating frequency and user branch are set before execution of programming/erasing. the user branch destination must be in an area other than the user mat area which is in the middle of programming and the area where the on-chip program is downloaded. these settings are performed by using the programming/erasing interface parameters. (4) programming/erasing execution to program or erase, the fwe pin must be brought high and user program mode must be entered. the program data/programming destination address is specified in 128-byte units when programming. the block to be erased is specified in erase-block units when erasing. these specifications are set by using the programming/erasing interface parameters and the on- chip program is initiated. the on-chip program is executed by using the jsr or bsr instruction to perform the subroutine call of the specified address in the on-chip ram. the execution result is returned to the programming/erasing interface parameters. the area to be programmed must be erased in advance when programming flash memory. there are limitations and notes on the interrupt processing during programming/erasing. for details, see section 23.8.2, interrupts during programming/erasing. (5) when programming/erasing is executed consecutively when the processing is not ended by the 128-byte programming or one-block erasure, the program address/data and erase-block number must be updated and consecutive programming/erasing is required. since the downloaded on-chip program is left in the on-chip ram after the processing, download and initialization are not required when the same processing is executed consecutively.
rev. 3.0, 09/04, page 843 of 1086 23.3 pin configuration flash memory is controlled by the pins as shown in table 23.3. table 23.3 pin configuration pin name abbreviation input/output function power-on reset res input reset flash programming enable fwe input hardware protection when programming flash memory mode 2 md2 input sets operating mode of this lsi mode 1 md1 input sets operating mode of this lsi mode 0 md0 input sets operating mode of this lsi transmit data txd1 output serial transmit data output (used in boot mode) receive data rxd1 input serial receive data input (used in boot mode) note: for the pin configuration in prom mode, see section 23.9, programmer mode. 23.4 register configuration 23.4.1 registers the registers/parameters which control flash memory when the on-chip flash memory is valid are shown in table 23.4. there are several operating modes for accessing flash memory, for example, read mode/program mode. there are two memory mats: user mat and user boot mat. the dedicated registers/parameters are allocated for each operating mode and mat selection. the correspondence of operating modes and registers/parameters for use is shown in table 23.5.
rev. 3.0, 09/04, page 844 of 1086 table 23.4 (1) register configuration name abbreviation r/w initial value address access size flash code control status register fccs r, w * 1 h'00 * 2 h'80 * 2 h'ffffe800 8 flash program code select register fpcs r/w h'00 h'ffffe801 8 flash erase code select register fecs r/w h'00 h'ffffe802 8 flash key code register fkey r/w h'00 h'ffffe804 8 flash mat select register fmats r/w h'00 * 3 h'aa * 3 h'ffffe805 8 flash transfer destination address register ftdar r/w h'00 h'ffffe806 8 ram emulation register ramer r/w h'0000 h'ffffec26 8, 16, 32 notes: all registers except for ramer can be accessed only in bytes, and the access requires three cycles. ramer can be accessed in bytes or words, and the access requires three cycles. 1. the bits except the sco bit are read-only bits. the sco bit is a programming-only bit. (the value which can be read is always 0.) 2. the initial value is h'00 when the fwe pin goes low. the initial value is h'80 when the fwe pin goes high. 3. the initial value at initiation in user mode or user program mode is h'00. the initial value at initiation in user boot mode is h'aa. 4. the registers except ramer can be accessed only in bytes, and the access requires four cycles. since ramer is in the bsc, when it is accessed in bytes or words, the access requires four cycles, and when it is accessed in longwords, the access requires eight cycles.
rev. 3.0, 09/04, page 845 of 1086 table 23.4 (2) parameter configuration name abbreviation r/w initial value address access size download pass/fail result dpfr r/w undefined on-chip ram * 8, 16, 32 flash pass/fail result fpfr r/w undefined r0 of cpu 8, 16, 32 flash multipurpose address area fmpar r/w undefined r5 of cpu 8, 16, 32 flash multipurpose data destination area fmpdr r/w undefined r4 of cpu 8, 16, 32 flash erase block select febs r/w undefined r4 of cpu 8, 16, 32 flash program and erase frequency control fpefeq r/w undefined r4 of cpu 8, 16, 32 flash user branch address set parameter fubra r/w undefined r5 of cpu 8, 16, 32 note: * one byte of the start address in the on-chip ram area specified by ftdar is valid. table 23.5 register/parameter and target mode download initiali- zation program- ming erasure read ram emulation fccs o ? ? ? ? ? fpcs o ? ? ? ? ? pecs o ? ? ? ? ? fkey o ? o o ? ? fmats ? ? o * 1 o * 1 o * 2 ? programming/ erasing interface registers ftdar o ? ? ? ? ? dpfr o ? ? ? ? ? fpfr o o o o ? ? fpefeq ? o ? ? ? ? fubra ? o ? ? ? ? fmpar ? ? o ? ? ? fmpdr ? ? o ? ? ? programming/ erasing interface parameters febs ? ? ? o ? ? ram emulation ramer ? ? ? ? ? o notes: 1. the setting is required when programming or erasing user mat in user boot mode. 2. the setting may be required according to the combination of initiation mode and read target mat.
rev. 3.0, 09/04, page 846 of 1086 23.4.2 programming/erasing interface registers the programming/erasing interface registers are as described below. they are all 8-bit registers that can be accessed in bytes. except for the fler bit in fccs and fmats, these registers are initialized at a power-on reset, in hardware standby mode, or in software standby mode. the fler bit or fmats is not initialized in software standby mode. (1) flash code control and status register (fccs) fccs is configured by bits which request the monitor of the fwe pin state and error occurrence during programming or erasing flash memory and the download of the on-chip program. bit : 76543210 fwe ? ? fler ? ? ? sco initial value : 1/00000000 r/w : rrrrrrr (r)w ? bit 7?flash programming enable (fwe): monitors the level which is input to the fwe pin that performs hardware protection of the flash memory programming or erasing. the initial value is 0 or 1 according to the fwe pin state. bit 7 fwe description 0 when the fwe pin goes low (in hardware protection state) 1 when the fwe pin goes high ? bits 6 and 5?reserved: these bits are always read as 0. the write value should always be 0. ? bit 4?flash memory error (fler): indicates an error occurs during programming and erasing flash memory. when fler is set to 1, flash memory enters the error protection state. this bit is initialized at a power-on reset or in hardware standby mode. when fler is set to 1, high voltage is applied to the internal flash memory. to reduce the damage to flash memory, the reset signal must be released after the reset period of 100 s which is longer than normal.
rev. 3.0, 09/04, page 847 of 1086 bit 4 fler description 0 flash memory operates normally (initial value) programming/erasing protection for flash memory (error protection) is invalid. [clearing condition] at a power-on reset or in hardware standby mode 1 indicates an error occurs during programming/erasing flash memory. programming/erasing protection for flash memory (error protection) is valid. [setting condition] see section 23.6.3, error protection. ? bits 3 to 1?reserved: these bits are always read as 0. the write value should always be 0. ? bit 0?source program copy operation (sco): requests the on-chip programming/erasing program to be downloaded to the on-chip ram. when this bit is set to 1, the on-chip program which is selected by fpcs/fecs is automatically downloaded in the on-chip ram area specified by ftdar. in order to set this bit to 1, ram emulation state must be canceled, h'a5 must be written to fkey, and this operation must be in the on-chip ram. four nop instructions must be executed immediately after setting this bit to 1. for interrupts during download, see section 23.8.2, interrupts during programming/erasing. for the download time, see section 23.8.3, other notes. since this bit is cleared to 0 when download is completed, this bit cannot be read as 1. download by setting the sco bit to 1 requires a special interrupt processing that performs bank switching to the on-chip program storage area. therefore, before issuing a download request (sco = 1), set vbr to h'00000000. otherwise, the cpu gets out of control. once download end is confirmed, vbr can be changed to any other value. bit 0 sco description 0 download of the on-chip programming/erasing program to the on-chip ram is not executed (initial value) [clearing condition] when download is completed 1 request that the on-chip programming/erasing program is downloaded to the on- chip ram is generated [clearing conditions] when all of the following conditions are satisfied and 1 is written to this bit ? fkey is written to h'a5 ? during execution in the on-chip ram ? not in ram emulation mode (rams in ramcr = 0)
rev. 3.0, 09/04, page 848 of 1086 (2) flash program code select register (fpcs) fpcs selects the on-chip programming program to be downloaded. bit : 76543210 ??????? ppvs initial value : 00000000 r/w : rrrrrrrr/w ? bits 7 to 1?reserved: these bits are always read as 0. the write value should always be 0. ? bit 0?program pulse single (ppvs): selects the programming program. bit 0 ppvs description 0 on-chip programming program is not selected (initial value) [clearing condition] when transfer is completed 1 on-chip programming program is selected (3) flash erase code select register (fecs) fecs selects download of the on-chip erasing program. bit : 76543210 ??????? epvb initial value : 00000000 r/w : rrrrrrrr/w ? bits 7 to 1?reserved: these bits are always read as 0. the write value should always be 0. ? bit 0?erase pulse verify block (epvb): selects the erasing program. bit 0 epvb description 0 on-chip erasing program is not selected (initial value) [clearing condition] when transfer is completed 1 on-chip erasing program is selected (4) flash key code register (fkey) fkey is a register for software protection that enables download of the on-chip program and programming/erasing of flash memory. before setting the sco bit to 1 in order to download the on-chip program or executing the downloaded programming/erasing program, these processings cannot be executed if the key code is not written.
rev. 3.0, 09/04, page 849 of 1086 bit : 76543210 k7 k6 k5 k4 k3 k2 k1 k0 initial value : 00000000 r/w : r/w r/w r/w r/w r/w r/w r/w r/w ? bits 7 to 0?key code (k7 to k0): only when h'a5 is written, writing to the sco bit is valid. when a value other than h'a5 is written to fkey, 1 cannot be written to the sco bit. therefore downloading to the on-chip ram cannot be executed. only when h'5a is written, programming/erasing of flash memory can be executed. even if the on-chip programming/erasing program is executed, flash memory cannot be programmed or erased when a value other than h'5a is written to fkey. bits 7 to 0 k7 to k0 description h'a5 writing to the sco bit is enabled (the sco bit cannot be set by a value other than h'a5.) h'5a programming/erasing is enabled (a value other than h'a5 enables software protection state.) h'00 initial value (5) flash mat select register (fmats) fmats specifies whether user mat or user boot mat is selected. bit : 76543210 ms7 ms6 ms5 ms4 ms3 ms2 ms1 ms0 initial value : 00000000 initial value : 10101010 (when not in user boot mode) (when in user boot mode) r/w : r/w r/w r/w r/w r/w r/w r/w r/w ? bits 7 to 0?mat select (ms7 to ms0): these bits are in user-mat selection state when a value other than h'aa is written and in user-boot-mat selection state when h'aa is written. the mat is switched by writing a value in fmats. when the mat is switched, follow section 23.8.1, switching between user mat and user boot mat. (the user boot mat cannot be programmed in user programming mode if user boot mat is selected by fmats. the user boot mat must be programmed in boot mode or in programmer mode.)
rev. 3.0, 09/04, page 850 of 1086 bits 7 to 0 ms7 to ms0 description h'aa the user boot mat is selected (in user-mat selection state when the value of these bits are other than h'aa) initial value when these bits are initiated in user boot mode. h'00 initial value when these bits are initiated in a mode except for user boot mode (in user-mat selection state) [programmable condition] these bits are in the execution state in the on-chip ram. (6) flash transfer destination address register (ftdar) ftdar specifies the on-chip ram address to which the on-chip program is downloaded. make settings for ftdar before writing 1 to the sco bit in fccs. the initial value is h'00 which points to the start address (h'ffff0000) in on-chip ram. bit : 76543210 tder tda6 tda5 tda4 tda3 tda2 tda1 tda0 initial value : 00000000 r/w : r/w r/w r/w r/w r/w r/w r/w r/w ? bit 7?transfer destination address setting error: this bit is set to 1 when there is an error in the download start address set by bits 6 to 0 (tda6 to tda0). whether the address setting is erroneous or not is judged by checking whether the setting of tda6 to tda0 is between the range of h'00 and h'05 after setting the sco bit in fccs to 1 and performing download. before setting the sco bit to 1 be sure to set the ftdar value between h'00 to h'05 as well as clearing this bit to 0. bit 7 tder description (return value after download) 0 setting of tda6 to tda0 is normal (initial value) 1 setting of tder and tda6 to tda0 is h'06 to h'ff and download has been aborted ? bits 6 to 0?transfer destination address (tda6 to tda0): these bits specify the download start address. a value from h'00 to h'05 can be set to specify the download start address in on- chip ram in 2-kbyte units. a value from h'06 to h'ff cannot be set. if such a value is set, the tder bit (bit 7) in this register is set to 1 to prevent download from being executed.
rev. 3.0, 09/04, page 851 of 1086 bits 6 to 0 tda6 to tda0 description h'00 download start address is set to h'ffff0000 h'01 download start address is set to h'ffff0800 h'02 download start address is set to h'ffff1000 h'03 download start address is set to h'ffff1800 h'04 download start address is set to h'ffff2000 h'05 download start address is set to h'ffff2800 h'06 to h'ff setting prohibited. if this value is set, the tder bit (bit 7) is set to 1 to abort the download processing. 23.4.3 programming/erasing interface parameters the programming/erasing interface parameters specify the operating frequency, user branch destination address, storage place for program data, programming destination address, and erase block and exchanges the processing result for the downloaded on-chip program. this parameter uses the general registers of the cpu (r4, r5, and r0) or the on-chip ram area. the initial value is undefined at a power-on reset or in hardware standby mode. at download all cpu registers are stored, and at initialization or when the on-chip program is executed, cpu registers except for r0 are stored. the return value of the processing result is written in r0. since the stack area is used for storing the registers or as a work area, the stack area must be saved at the processing start. (the maximum size of a stack area to be used is 128 bytes.) the programming/erasing interface parameters are used in the following four items. (1) download control (2) initialization before programming or erasing (3) programming (4) erasing these items use different parameters. the correspondence table is shown in table 23.6. the processing results of initialization, programming, and erasing are returned, but the bit contents have different meanings according to the processing program. see the description of fpfr for each processing.
rev. 3.0, 09/04, page 852 of 1086 table 23.6 usable parameters and target modes name of parameter abbrevia- tion down- load initiali- zation pro- gram- ming erasure r/w initial value allocation download pass/fail result dpfr o ? ? ? r/w undefined on-chip ram * flash pass/fail result fpfr ? o o o r/w undefined r0 of cpu flash programming/ erasing frequency control fpefeq ? o ? ? r/w undefined r4 of cpu flash user branch address set parameter fubra ? o ? ? r/w undefined r5 of cpu flash multipurpose address area fmpar ? ? o ? r/w undefined r5 of cpu flash multipurpose data destination area fmpdr ? ? o ? r/w undefined r4 of cpu flash erase block select febs ? ? ? o r/w undefined r4 of cpu note: * one byte of start address of download destination specified by ftdar (1) download control the on-chip program is automatically downloaded by setting the sco bit to 1. the on-chip ram area to be downloaded is the area as much as 2 kbytes starting from the start address specified by ftdar. for the address map of the on-chip ram, see figure 23.10. the download control is set by using the programming/erasing interface registers. the return value is given by the dpfr parameter. (a) download pass/fail result parameter (dpfr: one byte of start address of on-chip ram specified by ftdar) this parameter indicates the return value of the download result. the value of this parameter can be used to determine if downloading is executed or not. since the confirmation whether the sco bit is set to 1 is difficult, the certain determination must be performed by setting one byte of the start address of the on-chip ram area specified by ftdar to a value other than the return value of download (for example, h'ff) before the download start (before setting the sco bit to 1). for the checking method of download results, see section 23.5.2, user program mode.
rev. 3.0, 09/04, page 853 of 1086 7 0 6 0 5 0 4 0 3 0 0 sf 2 ss 1 fk bit : ? bits 7 to 3?unused: return 0. ? bit 2?source select error detect (ss): the on-chip program which can be downloaded can be specified as only one type. when more than two types of the program are selected, the program is not selected, or the program is selected without mapping, an error occurs. bit 2 ss description 0 download program can be selected normally 1 download error occurs (multi-selection or program which is not mapped is selected) ? bit 1?flash key register error detect (fk): returns the check result whether the value of fkey is set to h'a5. bit 1 fk description 0 fkey setting is normal (fkey = h'a5) 1 fkey setting is abnormal (fkey = value other than h'a5) ? bit 0?success/fail (sf): returns the result whether download has ended normally or not. bit 0 sf description 0 downloading on-chip program has ended normally (no error) 1 downloading on-chip program has ended abnormally (error occurs) (2) programming/erasing initialization the on-chip programming/erasing program to be downloaded includes the initialization program. the specified period pulse must be applied when programming or erasing. the specified pulse width is made by the method in which wait loop is configured by the cpu instruction. the operating frequency of the cpu must be set. since the user branch function is supported, the user branch destination address must be set. the initial program is set as a parameter of the programming/erasing program which has downloaded these settings. (2.1) flash programming/erasing frequency parameter (fpefeq: general register r4 of cpu) this parameter sets the operating frequency of the cpu. for the range of the operating frequency of this lsi, see section 27.3.2, clock timing.
rev. 3.0, 09/04, page 854 of 1086 31 0 30 0 29 0 28 0 27 0 24 0 26 0 25 0 bit : 23 0 22 0 21 0 20 0 19 0 16 0 18 0 17 0 bit : 15 f15 14 f14 13 f13 12 f12 11 f11 8 f8 10 f10 9 f9 bit : 7 f7 6 f6 5 f5 4 f4 3 f3 0 f0 2 f2 1 f1 bit : ? bits 31 to 16?unused: return 0. ? bits 15 to 0?frequency set (f15 to f0): set the operating frequency of the cpu. the setting value must be calculated as the following methods. 1. the operating frequency which is shown in mhz units must be rounded in a number to three decimal places and be shown in a number of two decimal places. 2. the centuplicated value is converted to the binary digit and is written to the fpefeq parameter (general register r4). for example, when the operating frequency of the cpu is 28.882 mhz, the value is as follows. 1. the number to three decimal places of 28.882 is rounded and the value is thus 28.88. 2. the formula that 28.88 100 = 2888 is converted to the binary digit and b'0000, 1011, 0100, 1000 (h'0b48) is set to r4. (2.2) flash user branch address setting parameter (fubra: general register r5 of cpu) this parameter sets the user branch destination address. the user program which has been set can be executed in specified processing units when programming and erasing. bit : 31 30 29 28 27 26 25 24 ua31 ua30 ua29 ua28 ua27 ua26 ua25 ua24 bit : 23 22 21 20 19 18 17 16 ua23 ua22 ua21 ua20 ua19 ua18 ua17 ua16 bit : 15 14 13 12 11 10 9 8 ua15 ua14 ua13 ua12 ua11 ua10 ua9 ua8 bit : 76543210 ua7 ua6 ua5 ua4 ua3 ua2 ua1 ua0 ? bits 31 to 0?user branch destination address (ua31 to ua0): when the user branch is not required, address 0 (h'00000000) must be set. the user branch destination must be an area other than the flash memory, an area other than the ram area in which on-chip program has been transferred, or the external bus space.
rev. 3.0, 09/04, page 855 of 1086 note that the cpu must not branch to an area without the execution code and get out of control. the on-chip program download area and stack area must not be overwritten. if cpu runaway occurs or the download area or stack area is overwritten, the value of flash memory cannot be guaranteed. the download of the on-chip program, initialization, initiation of the programming/erasing program must not be executed in the processing of the user branch destination. programming or erasing cannot be guaranteed when returning from the user branch destination. the program data which has already been prepared must not be programmed. store general registers r8 to r15 and the control register gbr. general registers r0 to r7 are available without storing them. moreover, the programming/erasing interface registers must not be written to or ram emulation mode must not be entered in the processing of the user branch destination. after the processing of the user branch has ended, the programming/erasing program must be returned to by using the rts instruction. for the execution intervals of the user branch processing, see note 2 (user branch processing intervals) in section 23.8.3, other notes. (2.3) flash pass/fail result parameter (fpfr: general register r0 of cpu) this parameter indicates the return value of the initialization result. 31 0 30 0 29 0 28 0 27 0 24 0 26 0 25 0 bit : 23 0 22 0 21 0 20 0 19 0 16 0 18 0 17 0 bit : 15 0 14 0 13 0 12 0 11 0 8 0 10 0 9 0 bit : 7 0 6 0 5 0 4 0 3 0 0 sf 2 br 1 fq bit : ? bits 31 to 3?unused: return 0. ? bit 2?user branch error detect (br): returns the check result whether the specified user branch destination address is in the area other than the storage area of the programming/erasing program which has been downloaded .
rev. 3.0, 09/04, page 856 of 1086 bit 2 br description 0 user branch address setting is normal 1 user branch address setting is abnormal ? bit 1?frequency error detect (fq): returns the check result whether the specified operating frequency of the cpu is in the range of the supported operating frequency. bit 1 fq description 0 setting of operating frequency is normal 1 setting of operating frequency is abnormal ? bit 0?success/fail (sf): indicates whether initialization is completed normally. bit 0 sf description 0 initialization has ended normally (no error) 1 initialization has ended abnormally (error occurs) (3) programming execution when flash memory is programmed, the programming destination address on the user mat must be passed to the programming program in which the program data is downloaded. 1. the start address of the programming destination on the user mat is set in general register r5 of the cpu. this parameter is called fmpar (flash multipurpose address area parameter). since the program data is always in 128-byte units, the lower eight bits (moa7 to moa0) must be h'00 or h'80 as the boundary of the programming start address on the user mat. 2. the program data for the user mat must be prepared in the consecutive area. the program data must be in the consecutive space which can be accessed by using the mov.b instruction of the cpu and is not the flash memory space. when data to be programmed does not satisfy 128 bytes, the 128-byte program data must be prepared by embedding the dummy code (h'ff). the start address of the area in which the prepared program data is stored must be set in general register r4. this parameter is called fmpdr (flash multipurpose data destination area parameter). for details on the programming procedure, see section 23.5.2, user program mode. (3.1) flash multipurpose address area parameter (fmpar: general register r5 of cpu) this parameter indicates the start address of the programming destination on the user mat. when an address in an area other than the flash memory space is set, an error occurs.
rev. 3.0, 09/04, page 857 of 1086 the start address of the programming destination must be at the 128-byte boundary. if this boundary condition is not satisfied, an error occurs. the error occurrence is indicated by the wa bit (bit 1) in fpfr. bit : 31 30 29 28 27 26 25 24 moa31 moa30 moa29 moa28 moa27 moa26 moa25 moa24 bit : 23 22 21 20 19 18 17 16 moa23 moa22 moa21 moa20 moa19 moa18 moa17 moa16 bit : 15 14 13 12 11 10 9 8 moa15 moa14 moa13 moa12 moa11 moa10 moa9 moa8 bit : 76543210 moa7 moa6 moa5 moa4 moa3 moa2 moa1 moa0 ? bits 31 to 0?moa31 to moa0: store the start address of the programming destination on the user mat. the consecutive 128-byte programming is executed starting from the specified start address of the user mat. the moa6 to moa0 bits are always 0 because the start address of the programming destination is at the 128-byte boundary. (3.2) flash multipurpose data destination parameter (fmpdr: general register r4 of cpu) this parameter indicates the start address in the area which stores the data to be programmed in the user mat. when the storage destination of the program data is in flash memory, an error occurs. the error occurrence is indicated by the wd bit (bit 2) in fpfr. bit : 31 30 29 28 27 26 25 24 mod31 mod30 mod29 mod28 mod27 mod26 mod25 mod24 bit : 23 22 21 20 19 18 17 16 mod23 mod22 mod21 mod20 mod19 mod18 mod17 mod16 bit : 15 14 13 12 11 10 9 8 mod15 mod14 mod13 mod12 mod11 mod10 mod9 mod8 bit : 76543210 mod7 mod6 mod5 mod4 mod3 mod2 mod1 mod0 ? bits 31 to 0?mod31 to mod0: store the start address of the area which stores the program data for the user mat. the consecutive 128-byte data is programmed to the user mat starting from the specified start address.
rev. 3.0, 09/04, page 858 of 1086 (3.3) flash pass/fail parameter (fpfr: general register r0 of cpu) this parameter indicates the return value of the program processing result. 31 0 30 0 29 0 28 0 27 0 24 0 26 0 25 0 bit : 23 0 22 0 21 0 20 0 19 0 16 0 18 0 17 0 bit : 15 0 14 0 13 0 12 0 11 0 8 0 10 0 9 0 bit : 7 0 6 md 5 ee 4 fk 3 0 0 sf 2 wd 1 wa bit : ? bits 31 to 7?unused: return 0. ? bit 6?programming mode related setting error detect (md): returns the check result of whether the signal input to the fwe pin is high and whether the error protection state is entered. when a low-level signal is input to the fwe pin or the error protection state is entered, 1 is written to this bit. the input level to the fwe pin and the error protection state can be confirmed with the fwe bit (bit 7) and the fler bit (bit 4) in fccs, respectively. for conditions to enter the error protection state, see section 23.6.3, error protection. bit 6 md description 0 fwe and fler settings are normal (fwe = 1, fler = 0) 1 fwe = 0 or fler = 1, and programming cannot be performed ? bit 5?programming execution error detect (ee): 1 is returned to this bit when the specified data could not be written because the user mat was not erased or when flash-memory related register settings are partially changed on returning from the user branch processing. if this bit is set to 1, there is a high possibility that the user mat is partially rewritten. in this case, after removing the error factor, erase the user mat. if fmats is set to h'aa and the user boot mat is selected, an error occurs when programming is performed. in this case, both the user mat and user boot mat are not rewritten. programming of the user boot mat must be executed in boot mode or programmer mode.
rev. 3.0, 09/04, page 859 of 1086 bit 5 ee description 0 programming has ended normally 1 programming has ended abnormally (programming result is not guaranteed) ? bit 4?flash key register error detect (fk): returns the check result of the value of fkey before the start of the programming processing. bit 4 fk description 0 fkey setting is normal (fkey = h'a5) 1 fkey setting is error (fkey = value other than h'a5) ? bit 3?unused: returns 0. ? bit 2?write data address detect (wd): when an address in the flash memory area is specified as the start address of the storage destination of the program data, an error occurs. bit 2 wd description 0 setting of write data address is normal 1 setting of write data address is abnormal ? bit 1?write address error detect (wa): when the following items are specified as the start address of the programming destination, an error occurs. 1. the programming destination address is an area other than flash memory 2. the specified address is not at the 128-byte boundary (a6 to a0 are not 0) bit 1 wa description 0 setting of programming destination address is normal 1 setting of programming destination address is abnormal ? bit 0?success/fail (sf): indicates whether the program processing has ended normally or not. bit 0 sf description 0 programming has ended normally (no error) 1 programming has ended abnormally (error occurs)
rev. 3.0, 09/04, page 860 of 1086 (4) erasure execution when flash memory is erased, the erase-block number on the user mat must be passed to the erasing program which is downloaded. this is set to the febs parameter (general register r4). one block is specified from the block number 0 to 15. for details on the erasing procedure, see section 23.5.2, user program mode. (4.1) flash erase block select parameter (febs: general register r4 of cpu) this parameter specifies the erase-block number. several block numbers cannot be specified. 31 0 30 0 29 0 28 0 27 0 24 0 26 0 25 0 bit : 23 0 22 0 21 0 20 0 19 0 16 0 18 0 17 0 bit : 15 0 14 0 13 0 12 0 11 0 8 0 10 0 9 0 bit : 7 ebs7 6 ebs6 5 ebs5 4 ebs4 3 ebs3 0 ebs0 2 ebs2 1 ebs1 bit : ? bits 31 to 8?unused: return 0. ? bits 7 to 0?erase block (eb7 to eb0): set the erase-block number in the range from 0 to 15. 0 corresponds to the eb0 block and 15 corresponds to the eb15 block. an error occurs when a number other than 0 to 15 (h'00 to h'0f) is set. (4.2) flash pass/fail result parameter (fpfr: general register r0 of cpu) this parameter returns the value of the erasing processing result. 31 0 30 0 29 0 28 0 27 0 24 0 26 0 25 0 bit : 23 0 22 0 21 0 20 0 19 0 16 0 18 0 17 0 bit : 15 0 14 0 13 0 12 0 11 0 8 0 10 0 9 0 bit : 7 0 6 md 5 ee 4 fk 3 eb 0 sf 2 0 1 0 bit : ? bits 31 to 7?unused: return 0.
rev. 3.0, 09/04, page 861 of 1086 ? bit 6?erasure mode related setting error detect (md): returns the check result of whether the signal input to the fwe pin is high and whether the error protection state is entered. when a low-level signal is input to the fwe pin or the error protection state is entered, 1 is written to this bit. the input level to the fwe pin and the error protection state can be confirmed with the fwe bit (bit 7) and the fler bit (bit 4) in fccs, respectively. for conditions to enter the error protection state, see section 23.6.3, error protection. bit 6 md description 0 fwe and fler settings are normal (fwe = 1, fler = 0) 1 fwe = 0 or fler = 1, and erasure cannot be performed ? bit 5?erasure execution error detect (ee): 1 is returned to this bit when the user mat could not be erased or when flash-memory related register settings are partially changed on returning from the user branch processing. if this bit is set to 1, there is a high possibility that the user mat is partially erased. in this case, after removing the error factor, erase the user mat. if fmats is set to h'aa and the user boot mat is selected, an error occurs when erasure is performed. in this case, both the user mat and user boot mat are not erased. erasure of the user boot mat must be executed in boot mode or programmer mode. bit 5 ee description 0 erasure has ended normally 1 erasure has ended abnormally (erasure result is not guaranteed) ? bit 4?flash key register error detect (fk): returns the check result of fkey value before start of the erasing processing. bit 4 fk description 0 fkey setting is normal (fkey = h'5a) 1 fkey setting is error (fkey = value other than h'5a) ? bit 3?erase block select error detect (eb): returns the check result whether the specified erase-block number is in the block range of the user mat.
rev. 3.0, 09/04, page 862 of 1086 bit 3 eb description 0 setting of erase-block number is normal 1 setting of erase-block number is abnormal ? bits 2 and 1?unused: return 0. ? bit 0?success/fail (sf): indicates whether the erasing processing has ended normally or not. bit 0 sf description 0 erasure has ended normally (no error) 1 erasure has ended abnormally (error occurs) 23.4.4 ram emulation register (ramer) when the realtime programming of the user mat is emulated, ramer sets the area of the user mat which is overlapped with a part of the on-chip ram. ramer is initialized to h'0000 at a power-on reset or in hardware standby mode and is not initialized in software standby mode. the ramer setting must be executed in user mode or in user program mode. for the division method of the user-mat area, see table 23.7. in order to operate the emulation function certainly, the target mat of the ram emulation must not be accessed immediately after ramer is programmed. if it is accessed, the normal access is not guaranteed. 15 0 r 14 0 r 13 0 r 12 0 r 11 0 r 8 0 r 10 0 r 9 0 r bit : initial value : r/w : 7 0 r 6 0 r 5 0 r 4 0 r 3 rams 0 r/w 0 ram0 0 r/w 2 ram2 0 r/w 1 ram1 0 r/w bit : initial value : r/w : ? bits 15 to 4?reserved: these bits are always read as 0. the write value should always be 0. ? bit 3?ram select (rams): sets whether the user mat is emulated or not. when rams = 1, all blocks of the user mat are in the programming/erasing protection state.
rev. 3.0, 09/04, page 863 of 1086 bit 3 rams description 0 emulation is not selected (initial value) programming/erasing protection of all user-mat blocks is invalid 1 emulation is selected programming/erasing protection of all user-mat blocks is valid ? bits 2 to 0?user mat area select: these bits are used with bit 3 to select the user-mat area to be overlapped with the on-chip ram. (see table 23.7.) table 23.7 overlapping of ram area and user mat area ram area block name rams ram2 ram1 ram0 h'ffff0000 to h'ffff0fff ram area (4 kbytes) 0 *** h'00000000 to h'00000fff eb0 (4 kbytes) 1 0 0 0 h'00001000 to h'00001fff eb1 (4 kbytes) 1 0 0 1 h'00002000 to h'00002fff eb2 (4 kbytes) 1 0 1 0 h'00003000 to h'00003fff eb3 (4 kbytes) 1 0 1 1 h'00004000 to h'00004fff eb4 (4 kbytes) 1 1 0 0 h'00005000 to h'00005fff eb5 (4 kbytes) 1 1 0 1 h'00006000 to h'00006fff eb6 (4 kbytes) 1 1 1 0 h'00007000 to h'00007fff eb7 (4 kbytes) 1 1 1 1 note: * don't care.
rev. 3.0, 09/04, page 864 of 1086 23.5 on-board programming mode when the pin is set in on-board programming mode and the reset start is executed, the on-board programming state that can program/erase the on-chip flash memory is entered. on-board programming mode has three operating modes: user programming mode, user boot mode, and boot mode. for details on the pin setting for entering each mode, see table 23.1. for details on the state transition of each mode for flash memory, see figure 23.2. 23.5.1 boot mode boot mode executes programming/erasing user mat and user boot mat by means of the control command and program data transmitted from the host using the on-chip sci. the tool for transmitting the control command and program data must be prepared in the host. the sci communication mode is set to asynchronous mode. when reset start is executed after this lsi's pin is set in boot mode, the boot program in the microcomputer is initiated. after the sci bit rate is automatically adjusted, the communication with the host is executed by means of the control command method. the system configuration diagram in boot mode is shown in figure 23.6. for details on the pin setting in boot mode, see table 23.1. interrupts are ignored in boot mode, so do not generate them. note that the aud cannot be used during boot mode operation. host rxd1 txd1 control command, analysis execution software (on-chip) flash memory on-chip ram on-chip sci1 this lsi boot programming tool and program data control command, program data reply response figure 23.6 system configuration in boot mode
rev. 3.0, 09/04, page 865 of 1086 (1) sci interface setting by host when boot mode is initiated, this lsi measures the low period of asynchronous sci- communication data (h'00), which is transmitted consecutively by the host. the sci transmit/receive format is set to 8-bit data, 1 stop bit, and no parity. this lsi calculates the bit rate of transmission by the host by means of the measured low period and transmits the bit adjustment end sign (1 byte of h'00) to the host. the host must confirm that this bit adjustment end sign (h'00) has been received normally and transmits 1 byte of h'55 to this lsi. when reception is not executed normally, boot mode is initiated again (reset) and the operation described above must be executed. the bit rate between the host and this lsi is not matched because of the bit rate of transmission by the host and system clock frequency of this lsi. to operate the sci normally, the transfer bit rate of the host must be set to 9,600 bps or 19,200 bps. the system clock frequency which can automatically adjust the transfer bit rate of the host and the bit rate of this lsi is shown in table 23.8. boot mode must be initiated in the range of this system clock. d0 d1 d2 d3 d4 d5 d6 d7 start bit stop bit measure low period (9 bits) (data is h'00) high period of at least 1 bit figure 23.7 automatic adjustment operation of sci bit rate table 23.8 system clock frequency that can automatically adjust bit rate of this lsi host bit rate system clock frequency which can automatically adjust lsi's bit rate 9,600 bps 20 to 40 mhz (input frequency of 5 to 10 mhz) 19,200 bps 20 to 40 mhz (input frequency of 5 to 10 mhz) (2) state transition the overview of the state transition after boot mode is initiated is shown in figure 23.8. for details on boot mode, see section 23.10.1, serial communications interface specification for boot mode. 1. bit rate adjustment after boot mode is initiated, the bit rate of the sci interface is adjusted with that of the host. 2. waiting for inquiry set command for inquiries about the user-mat size and configuration, mat start address, and support state, the required information is transmitted to the host.
rev. 3.0, 09/04, page 866 of 1086 3. automatic erasure of all user mat and user boot mat after inquiries have finished, all of the user mat and user boot mat are automatically erased if a programming/erasing status transition command is sent. 4. waiting for programming/erasing command ? when the program selection command is received, the state for waiting program data is entered. the programming start address and program data must be transmitted following the programming command. when programming is finished, the programming start address must be set to h'ffffffff and transmitted. then the state for waiting program data is returned to the state of programming/erasing command wait. ? when the erasure selection command is received, the state for waiting erase-block data is entered. the erase-block number must be transmitted following the erasing command. when the erasure is finished, the erase-block number must be set to h'ff and transmitted. then the state for waiting erase-block data is returned to the state for waiting programming/erasing command. the erasure must be executed when reset start is not executed and the specified block is programmed after programming is executed in boot mode. when programming can be executed by only one operation, all blocks are erased before the state for waiting programming/erasing/other command is entered. the erasing operation is not required. ? there are many commands other than programming/erasing. examples are sum check, blank check (erasure check), and memory read of the user mat/user boot mat and acquisition of current status information. note that memory read of the user mat/user boot mat can only read the program data after all user mat/user boot mat has automatically been erased.
rev. 3.0, 09/04, page 867 of 1086 wait for inquiry setting command wait for programming/erasing command bit rate adjustment processing of read/check command boot mode initiation (reset by boot mode) h'00 to h'00 reception (bit rate adjustment) processing of inquiry setting command all user mat and user boot mat erasure wait for program data wait for erase-block data read/check command reception command response program selection command reception program data transmission erasure selection command reception program end notice erase-block specification erasure end notice inquiry command reception h'55 reception inquiry command response 1 2 3 4 figure 23.8 overview of boot mode state transition
rev. 3.0, 09/04, page 868 of 1086 23.5.2 user program mode the user mat can be programmed/erased in user program mode. (the user boot mat cannot be programmed/erased.) programming/erasing is executed by downloading the program in the microcomputer. the overview flow is shown in figure 23.9. high voltage is applied to internal flash memory during the programming/erasing processing. therefore, transition to reset or hardware standby mode must not be executed. doing so may cause damage or destroy flash memory. if reset is executed accidentally, the reset signal must be released after the reset input period, which is longer than the normal 100 s. for details on the programming procedure, see the description in 23.5.2 (2) programming procedure in user program mode. for details on the erasing procedure, see the description in 23.5.2 (3) erasing procedure in user program mode. for the overview of a processing that repeats erasing and programming by downloading the programming program and the erasing program in separate on-chip rom areas using ftdar, see the description in 23.5.2 (4) erasing and programming procedure in user program mode. when programming, program data is prepared fwe=1 ? programming/erasing procedure program is transferred to the on-chip ram and executed yes no programming/erasing start programming/erasing end 1. ram emulation mode must be canceled in advance. download cannot be executed in emulation mode. 2. when the program data is made by means of emulation, the download destination must be changed by ftdar. with the initial setting of ftdar (h'00), the download area is overlapped with the emulation area. 3. inputting high level to the fwe pin sets the fwe bit to 1. 4. programming/erasing is executed only in the on-chip ram. however, if the program data is in a consecutive area and can be accessed by the mov.b instruction of the cpu like sram/rom, the program data can be in an external space. 5. after programming/erasing is finished, low level must be input to the fwe pin for protection. figure 23.9 programming/erasing overview flow
rev. 3.0, 09/04, page 869 of 1086 (1) on-chip ram address map when programming/erasing is executed parts of the procedure program that are made by the user, like download request, programming/erasing procedure, and judgement of the result, must be executed in the on-chip ram. all of the on-chip program that is to be downloaded is in on-chip ram. note that on- chip ram must be controlled so that these parts do not overlap. figure 23.10 shows the program area to be downloaded. system use area (15 bytes) ramtop (h'ffff0000) ftdar setting programming/ erasing entry dpfr (return value: 1 byte) ram emulation area or area that can be used by user ftdar setting+16 < on-chip ram > address initialization process entry ftdar setting+32 ftdar setting+2048 initialization + programming program or initialization + erasing program area that can be used by user ramend (h'ffffbfff) area to be downloaded (size: 2 kbytes) unusable area in programming/erasing processing period figure 23.10 ram map after download
rev. 3.0, 09/04, page 870 of 1086 (2) programming procedure in user program mode the procedures for download, initialization, and programming are shown in figure 23.11. select on-chip program to be downloaded and set download destination by ftdar set fkey to h'a5 after clearing vbr, set sco to 1 and execute download dpfr=0? yes no download error processing set the fpefeq and fubra parameters initialization jsr ftdar setting+32 yes end programming procedure program fpfr=0? no initialization error processing clear fkey to 0 set parameter to r4 and r5 (fmpar and fmpdr) programming jsr ftdar setting+16 yes fpfr=0? no clear fkey and programming error processing yes required data programming is completed? no set fkey to h'5a clear fkey to 0 (2.1) (2.2) (2.4) (2.5) (2.6) (2.7) (2.8) (2.9) (2.10) (2.11) (2.12) (2.13) (2.14) 1 1 (2.3) download initialization programming start programming procedure program figure 23.11 programming procedure the details of the programming procedure are described below. the procedure program must be executed in an area other than the flash memory to be programmed. especially the part where the sco bit in fccs is set to 1 for downloading must be executed in the on-chip ram. the area that can be executed in the steps of the user procedure program (on-chip ram, user mat, and external space) is shown in section 23.10.3, storable area for procedure program and programming data. the following description assumes the area to be programmed on the user mat is erased and program data is prepared in the consecutive area. when erasing has not been executed, carry out erasing before writing. 128-byte programming is performed in one program processing. when more than 128-byte programming is performed, programming destination address/program data parameter is updated in 128-byte units and programming is repeated.
rev. 3.0, 09/04, page 871 of 1086 when less than 128-byte programming is performed, data must total 128 bytes by adding the invalid data. if the invalid data to be added is h'ff, the program processing period can be shortened. (2.1) select the on-chip program to be downloaded when the ppvs bit of fpcs is set to 1, the programming program is selected. several programming/erasing programs cannot be selected at one time. if several programs are set, download is not performed and a download error is returned to the source select error detect (ss) bit in the dpfr parameter. specify the start address of the download destination by ftdar. (2.2) write h'a5 in fkey if h'a5 is not written to fkey for protection, 1 cannot be written to the sco bit for a download request. (2.3) vbr is cleared to 0 and 1 is written to the sco bit of fccs, and then download is executed. vbr must always be cleared to h?00000000 before setting the sco bit to 1. to write 1 to the sco bit, the following conditions must be satisfied. ? ram emulation mode is canceled. ? h'a5 is written to fkey. ? the sco bit writing is executed in the on-chip ram. when the sco bit is set to 1, download is started automatically. when execution returns to the user procedure program, the sco bit is cleared to 0. therefore, the sco bit cannot be confirmed to be 1 in the user procedure program. the download result can be confirmed only by the return value of the dpfr parameter. before the sco bit is set to 1, incorrect judgement must be prevented by setting the dpfr parameter, that is one byte of the start address of the on-chip ram area specified by ftdar, to a value other than the return value (h'ff). when download is executed, particular interrupt processing, which is accompanied by the bank switch as described below, is performed as an internal microcomputer processing, so vbr need to be cleared to 0. four nop instructions are executed immediately after the instructions that set the sco bit to 1. ? the user mat space is switched to the on-chip program storage area. ? after the selection condition of the download program and the address set in ftdar are checked, the transfer processing is executed starting from the on-chip ram address specified by ftdar. ? the sco bits in fpcs, fecs, and fccs are cleared to 0. ? the return value is set to the dpfr parameter. ? after the on-chip program storage area is returned to the user mat space, execution returns to the user procedure program. after download is completed and the user procedure program is running, the vbr setting can be changed. the notes on download are as follows.
rev. 3.0, 09/04, page 872 of 1086 in the download processing, the values of the general registers of the cpu are retained. during the download processing, the interrupt processing cannot be executed. however, the nmi, ubc, and h-udi interrupt requests are retained, so that on returning to the user procedure program, the interrupt processing starts. for details on the relationship between download and interrupts, see section 23.8.2, interrupts during programming/erasing. since a stack area of maximum 128 bytes is used, an area of at least 128 bytes must be saved before setting the sco bit to 1. if an access by the dmac or aud occurs during download, operation cannot be guaranteed. therefore, access by the dmac or aud must not be executed. (2.4) fkey is cleared to h'00 for protection. (2.5) the value of the dpfr parameter must be checked to confirm the download result. a recommended procedure for confirming the download result is shown below. ? check the value of the dpfr parameter (one byte of start address of the download destination specified by ftdar). if the value is h?00, download has been performed normally. if the value is not h?00, the source that caused download to fail can be investigated by the description below. ? if the value of the dpfr parameter is the same as before downloading (e.g. h?ff), the address setting of the download destination in ftdar may be abnormal. in this case, confirm the setting of the tder bit (bit 7) in ftdar. ? if the value of the dpfr parameter is different from before downloading, check the ss bit (bit 2) and the fk bit (bit 1) in the dpfr parameter to ensure that the download program selection and fkey register setting were normal, respectively. (2.6) the operating frequency is set to the fpefeq parameter and the user branch destination is set to the fubra parameter for initialization. ? the current frequency of the cpu clock is set to the fpefeq parameter (general register r4). for the settable range of the fpefeq parameter, see section 27.3.2, clock timing. for the settable range of the fpefeq parameter, see section 27.3.2, clock timing. when the frequency is set out of this range, an error is returned to the fpfr parameter of the initialization program and initialization is not performed. for details on the frequency setting, see the description in 23.4.3 (2.1) flash programming/erasing frequency parameter (fpefeq).
rev. 3.0, 09/04, page 873 of 1086 ? the start address in the user branch destination is set to the fubra parameter (general register r5). when the user branch processing is not required, 0 must be set to fubra. when the user branch is executed, the branch destination is executed in flash memory other than the one that is to be programmed. the area of the on-chip program that is downloaded cannot be set. the program processing must be returned from the user branch processing by the rts instruction. see the description in 23.4.3 (2.2) flash user branch address setting parameter (fubra). (2.7) initialization when a programming program is downloaded, the initialization program is also downloaded to on-chip ram. there is an entry point of the initialization program in the area from (download start address set by ftdar) + 32 bytes. the subroutine is called and initialization is executed by using the following steps. mov.l #dltop+32,r1 ; set entry address to r1 jsr @r1 ; call initialization routine nop ? the general registers other than r0 are saved in the initialization program. ? r0 is a return value of the fpfr parameter. ? since the stack area is used in the initialization program, a stack area of maximum 128 bytes must be reserved in ram. ? interrupts can be accepted during the execution of the initialization program. however, the program storage area and stack area in on-chip ram and register values must not be destroyed. (2.8) the return value of the initialization program, fpfr (general register r0) is judged. (2.9) fkey must be set to h'5a and the user mat must be prepared for programming. (2.10) the parameter which is required for programming is set. the start address of the programming destination of the user mat (fmpar) is set to general register r5. the start address of the program data storage area (fmpdr) is set to general register r4. ? fmpar setting fmpar specifies the programming destination start address. when an address other than one in the user mat area is specified, even if the programming program is executed, programming is not executed and an error is returned to the return value parameter fpfr. since the unit is 128 bytes, the lower eight bits (moa7 to moa0) must be in the 128-byte boundary of h'00 or h'80.
rev. 3.0, 09/04, page 874 of 1086 ? fmpdr setting if the storage destination of the program data is flash memory, even when the program execution routine is executed, programming is not executed and an error is returned to the fpfr parameter. in this case, the program data must be transferred to on-chip ram and then programming must be executed. (2.11) programming there is an entry point of the programming program in the area from (download start address set by ftdar) + 16 bytes of on-chip ram. the subroutine is called and programming is executed by using the following steps. mov.l #dltop+16,r1 ; set entry address to r1 jsr @r1 ; call programming routine nop ? the general registers other than r0 are saved in the programming program. ? r0 is a return value of the fpfr parameter. ? since the stack area is used in the programming program, a stack area of maximum 128 bytes must be reserved in ram. (2.12) the return value in the programming program, fpfr (general register r0) is judged. (2.13) determine whether programming of the necessary data has finished. if more than 128 bytes of data are to be programmed, specify fmpar and fmpdr in 128- byte units, and repeat steps (2.10) to (2.13). increment the programming destination address by 128 bytes and update the programming data pointer correctly. if an address which has already been programmed is written to again, not only will a programming error occur, but also flash memory will be damaged. (2.14) after programming finishes, clear fkey and specify software protection. if this lsi is restarted by a power-on reset immediately after user mat programming has finished, secure a reset period (period of res = 0) that is at least as long as the normal 100 s.
rev. 3.0, 09/04, page 875 of 1086 (3) erasing procedure in user program mode the procedures for download, initialization, and erasing are shown in figure 23.12. start erasing procedure program select on-chip program to be downloaded and set download destination by ftdar set fkey to h'a5 after clearing vbr, set sco to 1 and execute download dpfr = 0? yes no download error processing set the fpefeq and fubra parameters initialization jsr ftdar setting +32 yes end erasing procedure program fpfr=0 ? no initialization error processing clear fkey to 0 set febs parameter erasing jsr ftdar setting +16 yes fpfr=0 ? no clear fkey and erasing error processing yes required block erasing is completed? no set fkey to h'5a clear fkey to 0 (3.1) (3.2) (3.3) (3.4) (3.5) (3.6) 1 1 download initialization erasing figure 23.12 erasing procedure the details of the erasing procedure are described below. the procedure program must be executed in an area other than the user mat to be erased. especially the part where the sco bit in fccs is set to 1 for downloading must be executed in on-chip ram. the area that can be executed in the steps of the user procedure program (on-chip ram, user mat, and external space) is shown in section 23.10.3, storable area for procedure program and programming data. for the downloaded on-chip program area, see the ram map for programming/erasing in figure 23.10. a single divided block is erased by one erasing processing. for block divisions, see figure 23.4. to erase two or more blocks, update the erase block number and perform the erasing processing for each block.
rev. 3.0, 09/04, page 876 of 1086 (3.1) select the on-chip program to be downloaded set the epvb bit in fecs to 1. several programming/erasing programs cannot be selected at one time. if several programs are set, download is not performed and a download error is returned to the source select error detect (ss) bit in the dpfr parameter. specify the start address of the download destination by ftdar. the procedures to be carried out after setting fkey, e.g. download and initialization, are the same as those in the programming procedure. for details, see the description in 23.5.2 (2) programming procedure in user program mode. (3.2) set the febs parameter necessary for erasure set the erase block number of the user mat in the flash erase block select parameter (febs: general register r4). if a value other than an erase block number of the user mat is set, no block is erased even though the erasing program is executed, and an error is returned to the return value parameter fpfr. (3.3) erasure similar to as in programming, there is an entry point of the erasing program in the area from (download start address set by ftdar) + 16 bytes of on-chip ram. the subroutine is called and erasing is executed by using the following steps. mov.l #dltop+16,r1 ; set entry address to r1 jsr @r1 ; call erasing routine nop ? the general registers other than r0l are saved in the erasing program. ? r0 is a return value of the fpfr parameter. ? since the stack area is used in the erasing program, a stack area of maximum 128 bytes must be reserved in ram. (3.4) the return value in the erasing program, fpfr (general register r0) is judged. (3.5) determine whether erasure of the necessary blocks has finished. if more than one block is to be erased, update the febs parameter and repeat steps (3.2) to (3.5). blocks that have already been erased can be erased again. (3.6) after erasure finishes, clear fkey and specify software protection. if this lsi is restarted by a power-on reset immediately after user mat programming has finished, secure a reset period (period of res = 0) that is at least as long as the normal 100 s. (4) erasing and programming procedure in user program mode by changing the on-chip ram address of the download destination in ftdar, the erasing program and programming program can be downloaded to separate on-chip ram areas. figure 23.13 shows an example of repetitively executing ram emulation, erasing, and programming.
rev. 3.0, 09/04, page 877 of 1086 1 1 start procedure program set ftdar to h'02 (specify h'ffff1000 as download destination) initialize erasing program download erasing program set ftdar to h'03 (specify h'ffff1800 as download destination) initialize programming program download programming program end? end procedure program enter ram emulation mode and tune data in on-chip ram confirm operation set fmpdr to h'ffff0000 to program relevant block (execute programming program) cancel ram emulation mode erase relevant block (execute erasing program) programming program download erasing program download emulation/erasing/programming yes no figure 23.13 sample procedure of repeating ram emulation, erasing, and programming (overview) in the above example, the erasing program and programming program are downloaded to areas excluding the 4 kbytes (h'ffff0000 to h'ffff0fff) from the start of on-chip rom. download and initialization are performed only once at the beginning. in this kind of operation, note the following: ? be careful not to damage on-chip ram with overlapped settings. in addition to the ram emulation area, erasing program area, and programming program area, areas for the user procedure programs, work area, and stack area are reserved in on-chip ram. do not make settings that will overwrite data in these areas. ? be sure to initialize both the erasing program and programming program. initialization by setting the fpefeq and fubra parameters must be performed for both the erasing program and the programming program. initialization must be executed for both entry addresses: (download start address for erasing program) + 32 bytes (h'ffff1020 in this example) and (download start address for programming program) + 32 bytes (h'ffff1820 in this example).
rev. 3.0, 09/04, page 878 of 1086 23.5.3 user boot mode this lsi has user boot mode which is initiated with different mode pin settings than those in user program mode or boot mode. user boot mode is a user-arbitrary boot mode, unlike boot mode that uses the on-chip sci. only the user mat can be programmed/erased in user boot mode. programming/erasing of the user boot mat is only enabled in boot mode or programmer mode. (1) user boot mode initiation for the mode pin settings to start up user boot mode, see table 23.1, relationship between fwe and md pins and operating modes. when the reset start is executed in user boot mode, the check routine for flash-memory related registers runs. the ram area about 1.2 kbytes from h'ffff0800 and 4 bytes from h'ffffbffc (a stack area) is used by the routine. while the check routine is running, nmi and all other interrupts cannot be accepted. neither can the aud be used in this period. this period is 100 s while operating at an internal frequency of 40 mhz. next, processing starts from the execution start address of the reset vector in the user boot mat. at this point, h'aa is set to the flash mat select register (fmats) because the execution mat is the user boot mat. (2) user mat programming in user boot mode for programming the user mat in user boot mode, additional processings made by setting fmats are required: switching from user-boot-mat selection state to user-mat selection state, and switching back to user-boot-mat selection state after programming completes. figure 23.14 shows the procedure for programming the user mat in user boot mode.
rev. 3.0, 09/04, page 879 of 1086 select on-chip program to be downloaded and set download destination by ftdar set fkey to h'a5 dpfr=0 ? yes no download error processing set the fpefeq and fubra parameters initialization jsr ftdar setting +32 yes end programming procedure program fpfr=0 ? no initialization error processing clear fkey to 0 set parameter to r4 and r5 (fmpar and fmpdr) programming jsr ftdar setting +16 yes fpfr=0 ? no yes required data programming is completed? no set fkey to h'a5 clear fkey to 0 1 1 download initialization programming mat switchover mat switchover set fmats to value other than h'aa to select user mat after clearing vbr, set sco to 1 and execute download clear fkey and programming error processing * set fmats to h'aa to select user boot mat user-boot-mat selection state user-mat selection state user-boot-mat selection state note: * the mat must be switched by fmats to perform the programming error processing in the user boot mat. start programming procedure program figure 23.14 procedure for programming user mat in user boot mode the difference between the programming procedures in user program mode and user boot mode is whether the mat is switched or not as shown in figure 23.14. in user boot mode, the user boot mat can be seen in the flash memory space with the user mat hidden in the background. the user mat and user boot mat are switched only while the user mat is being programmed. because the user boot mat is hidden while the user mat is being programmed, the procedure program must be located in an area other than flash memory. after programming finishes, switch the mats again to return to the first state. mat switchover is enabled by writing a specific value to fmats. however note that while the mats are being switched, the lsi is in an unstable state, e.g. access to a mat is not allowed until mat switching is completely finished, and if an interrupt occurs, from which mat the interrupt vector is read from is undetermined. perform mat switching in accordance with the description in section 23.8.1, switching between user mat and user boot mat. except for mat switching, the programming procedure is the same as that in user program mode.
rev. 3.0, 09/04, page 880 of 1086 the area that can be executed in the steps of the user procedure program (on-chip ram, user mat, and external space) is shown in section 23.10.3, storable area for procedure program and programming data. (3) user mat erasing in user boot mode for erasing the user mat in user boot mode, additional processings made by setting fmats are required: switching from user-boot-mat selection state to user-mat selection state, and switching back to user-boot-mat selection state after erasing completes. figure 23.15 shows the procedure for erasing the user mat in user boot mode. start erasing procedure program select on-chip program to be downloaded and set download destination by ftdar set fkey to h'a5 dpfr=0 ? yes no download error processing set the fpefeq and fubra parameters initialization jsr ftdar setting +32 yes end erasing procedure program fpfr=0 ? no initialization error processing clear fkey to 0 set febs parameter programming jsr ftdar setting +16 yes fpfr=0 ? no clear fkey and erasing error processing * yes required block erasing is completed? no set fkey to h'5a clear fkey to 0 1 1 download initialization erasing set fmats to value other than h'aa to select user mat after clearing vbr, set sco to 1 and execute download set fmats to h'aa to select user boot mat user-boot-mat selection state user-mat selection state user-boot-mat selection state note: * the mat must be switched by fmats to perform the erasing error processing in the user boot mat. mat switchover mat switchover figure 22.15 procedure for erasing user mat in user boot mode the difference between the erasing procedures in user program mode and user boot mode depends on whether the mat is switched or not as shown in figure 23.15. mat switching is enabled by writing a specific value to fmats. however note that while the mats are being switched, the lsi is in an unstable state, e.g. access to a mat is not allowed until mat switching is completed finished, and if an interrupt occurs, from which mat the interrupt
rev. 3.0, 09/04, page 881 of 1086 vector is read from is undetermined. perform mat switching in accordance with the description in section 23.8.1, switching between user mat and user boot mat. except for mat switching, the erasing procedure is the same as that in user program mode. the area that can be executed in the steps of the user procedure program (on-chip ram, user mat, and external space) is shown in section 23.10.3, storable area for procedure program and programming data. 23.6 protection there are three kinds of flash memory program/erase protection: hardware, software, and error protection. 23.6.1 hardware protection programming and erasing of flash memory is forcibly disabled or suspended by hardware protection. in this state, the downloading of an on-chip program and initialization of the flash memory are possible. however, an activated program for programming or erasure cannot program or erase locations in a user mat, and the error in programming/erasing is reported in the fpfr parameter.
rev. 3.0, 09/04, page 882 of 1086 table 23.9 hardware protection function to be protected item description download programming/ erasure fwe-pin protection the input of a low-level signal on the fwe pin clears the fwe bit of fccs and the lsi enters a programming/erasing-protected state. ?o reset/standby protection ? a power-on reset (including a power- on reset by the wdt) and entry to standby mode initializes the programming/erasing interface registers and the lsi enters a programming/erasing-protected state. ? resetting by means of the res pin after power is initially supplied will not make the lsi enter the reset state unless the res pin is held low until oscillation has stabilized. in the case of a reset during operation, hold the res pin low for the res pulse width that is specified in the section on ac characteristics. if the lsi is reset during programming or erasure, data in the flash memory is not guaranteed. in this case, execute erasure and then execute programming again. oo 23.6.2 software protection software protection is set up in any of three ways: by disabling the downloading of on-chip programs for programming and erasing, by means of a key code, and by the ram emulation register (ramer).
rev. 3.0, 09/04, page 883 of 1086 table 23.10 software protection function to be protected item description download programming/ erasure protection by the sco bit clearing the sco bit in fccs disables downloading of the programming/erasing program, thus making the lsi enter a programming/erasing-protected state. oo protection by fkey downloading and programming/erasing are disabled unless the required key code is written in fkey. different key codes are used for downloading and for programming/erasing. oo emulation protection setting the rams bit in ramer to 1 makes the lsi enter a programming/erasing-protected state. oo 23.6.3 error protection error protection is a mechanism for aborting programming or erasure when an error occurs, in the form of the microcomputer getting out of control during programming/erasing of the flash memory or operations that are not in accordance with the established procedures for programming/erasing. aborting programming or erasure in such cases prevents damage to the flash memory due to excessive programming or erasing. if the microcomputer malfunctions during programming/erasing of the flash memory, the fler bit in fccs is set to 1 and the lsi enters the error protection state, thus aborting programming or erasure. the fler bit is set to 1 in the following conditions: ? when the relevant bank area of flash memory is read during programming/erasing (including a vector read or an instruction fetch) ? when a sleep instruction (including software standby mode) is executed during programming/erasing error protection is cancelled (fler bit is cleared) only by a power-on reset or in hardware- standby mode. note that the reset signal should only be released after providing a reset input over a period longer than the normal 100 s. since high voltages are applied during programming/erasing of the flash memory, some voltage may still remain even after the error protection state has been entered. for
rev. 3.0, 09/04, page 884 of 1086 this reason, it is necessary to reduce the risk of damage to the flash memory by extending the reset period so that the charge is released. the state-transition diagram in figure 23.16 shows transitions to and from the error protection state. reset or standby (hardware protection) program mode erase mode error protection mode error protection mode (software standby) read disabled programming/erasing enabled fler=0 read enabled programming/erasing disabled fler=0 read enabled programming/erasing disabled fler=1 read disabled programming/erasing disabled fler=1 = 0 or = 0 error occurred error occurred (software standby) =0 or =0 software standby mode cancel software standby mode =0 or =0 programming/erasing interface register is in its initial state. programming/erasing interface register is in its initial state. figure 23.16 transitions to and from error protection state
rev. 3.0, 09/04, page 885 of 1086 23.7 flash memory emulation in ram to provide real-time emulation in ram of data that is to be written to the flash memory, a part of the ram can be overlaid on an area of flash memory (user mat) that has been specified by the ram emulation register (ramer). after the ramer setting is made, the ram is accessible in both the user mat area and as the ram area that has been overlaid on the user mat area. such emulation is possible in user mode and user program mode. figure 23.17 shows an example of the emulation of realtime programming of the user mat area. start of emulation program set ramer write the data for tuning to the overlapped ram area execute application program tuning ok? cancel ramer setting program the emulation block in the user mat end of emulation program yes no figure 23.17 emulation of flash memory in ram
rev. 3.0, 09/04, page 886 of 1086 eb0 h'00000 eb1 h'01000 eb2 h'02000 eb3 h'03000 eb4 h'04000 eb5 h'05000 eb6 h'06000 eb7 h'07000 h'08000 h'fffff flash memory (user mat) eb8 to eb15 h'ffff0000 h'ffff0fff h'ffffbfff on-chip ram this area is accessible as both a ram area and as a flash memory area. figure 23.18 example of overlapped ram operation figure 23.18 shows an example of an overlap on block area eb0 of the flash memory. emulation is possible for a single area selected from among the eight areas, from eb0 to eb7, of the user mat. the area is selected by the setting of the ram2 to ram0 bits in ramer. (1) to overlap a part of the ram on area eb0, to allow realtime programming of the data for this area, set the rams bit in ramer to 1, and each of the ram2 to ram0 bits to 0. (2) realtime programming is carried out using the overlaid area of ram. in programming or erasing the user mat, it is necessary to run a program that implements a series of procedural steps, including the downloading of an on-chip program. in this process, set the download area with ftdar so that the overlaid ram area and the area where the on-chip program is to be downloaded do not overlap. the initial setting (h?00) of ftdar causes the tuned data area to overlap with the download area. when using the initial setting of ftdar, the data that is to be programmed must be saved beforehand in an area that is not used by the system. figure 23.19 shows an example of programming data that has been emulated to the eb0 area in the user mat.
rev. 3.0, 09/04, page 887 of 1086 eb0 h'00000 eb1 h'01000 eb2 h'02000 eb3 h'03000 eb4 h'04000 eb5 h'05000 eb6 h'06000 eb7 h'07000 h'08000 h'fffff flash memory (user mat) eb8 to eb15 h'ffff0000 h'ffff0fff ftdar setting h'ffffbfff download area programming/erasing procedure program area (1) cancel the emulation mode. (2) transfer the user programming/erasing procedure program. (3) download the on-chip programming/ erasing program to the destination set by ftdar without overlapping the tuned data area. (4) execute programming after erasing. tuned data area figure 23.19 programming of tuned data 1. after the data to be programmed has fixed values, clear the rams bit to 0 to cancel the overlap of ram. emulation mode is canceled and emulation protection is also cleared. 2. transfer the user programming/erasing procedure program to ram. 3. run the programming/erasing procedure program in ram and download the on-chip programming/erasing program. specify the download start address with ftdar so that the tuned data area does not overlap with the download area. 4. when the eb0 area of the user mat has not been erased, erasing must be performed before programming. set the parameters fmpar and fmpdr so that the tuned data is designated, and execute programming. note: setting the rams bit to 1 puts all the blocks in flash memory in the programming/erasing-protected state regardless of the values of the ram2 to ram0 bits (emulation protection). clear the rams bit to 0 before actual programming or erasure. though ram emulation can also be carried out with the user boot mat selected, the user boot mat can be erased or programmed only in boot mode or programmer mode.
rev. 3.0, 09/04, page 888 of 1086 23.8 usage notes 23.8.1 switching between user mat and user boot mat it is possible to switch between the user mat and user boot mat. however, the following procedure is required because these mats are allocated to address 0. (switching to the user boot mat disables programming and erasing. programming of the user boot mat must take place in boot mode or programmer mode.) (1) mat switching by fmats should always be executed from the on-chip ram. the sh microcomputer prefetches execution instructions. therefore, a switchover during program execution in the user mat causes an instruction code in the user mat to be prefetched or an instruction in the newly selected user boot mat to be prefetched, thus resulting in unstable operation. (2) to ensure that the mat that has been switched to is accessible, execute four nop instructions in on-chip ram immediately after writing to fmats of on-chip ram (this prevents access to the flash memory during mat switching). (3) if an interrupt occurs during switching, there is no guarantee of which memory mat is being accessed. always mask the maskable interrupts before switching mats. in addition, configuring the system so that nmi interrupts do not occur during mat switching is recommended. (4) after the mats have been switched, take care because the interrupt vector table will also have been switched. if the same interrupt processings are to be executed before and after mat switching or interrupt requests cannot be disabled, transfer the interrupt processing routine to on-chip ram, and use the vbr setting to place the interrupt vector table in on chip ram. in this case, make sure the vbr setting change does not conflict with the interrupt occurrence. (5) memory sizes of the user mat and user boot mat are different. when accessing the user boot mat, do not access addresses exceeding the 8-kbyte memory space. if access goes beyond the 8-kbyte space, the values read are undefined.
rev. 3.0, 09/04, page 889 of 1086 < user mat >< on-chip ram >< user boot mat > procedure for switching to the user boot mat procedure for switching to the user mat procedure for switching to the user boot mat (1) mask interrupts. (2) write h'aa to fmats. (3) execute four nop instructions before accessing the user boot mat. procedure for switching to the user mat (1) mask interrupts. (2) write a value other than h'aa to fmats. (3) execute four nop instructions before accessing the user mat. figure 23.20 switching between user mat and user boot mat 23.8.2 interrupts during programming/erasing (1) download of on-chip program (1.1) vbr setting change before downloading the on-chip program, vbr must be set to h'00000000 (initial value). if vbr is set to a value other than the initial value, the interrupt vector table is placed in the user mat (fmats is not h'aa) or the user boot mat (fmats is h'aa) on initialization of vbr. when vbr setting change conflicts with interrupt occurrence, whether the vector table before or after vbr is changed is referenced may cause an error. therefore, for cases where vbr setting change may conflict with interrupt occurrence, prepare a vector table to be referenced when vbr is h'00000000 at the start of the user mat or user boot mat. (1.2) sco download request and interrupt request download of the on-chip programming/erasing program that is initiated by setting the sco bit in fccs to 1 generates a particular interrupt processing accompanied by mat switchover. operation when the sco download request and interrupt request conflicts is described below. 1. contention between sco download request and interrupt request figure 23.21 shows the timing of contention between execution of the instruction that sets the sco bit in fccs to 1 and interrupt acceptance.
rev. 3.0, 09/04, page 890 of 1086 n n+1 n+2 n+3 n+4 fetch decoding execution execution execution (a) (b) (c) cpu cycle cpu operation for instruction that sets sco bit to 1 (a) when the interrupt is accepted at or before the (n + 1) cycle after the interrupt processing completes, the sco bit is set to 1 and download is executed. (b) when the interrupt is accepted at the (n + 2) cycle the interrupt conflicts with the sco download request. for details on operation in this case, see 2. operation when contention occurs. (c) when the interrupt is accepted at or after the (n + 3) cycle the sco download request occurs prior to the interrupt request, and download is executed. during download, no other interrupt processing can be handled. if an interrupt is still being requested after download completes, the interrupt processing starts. for details on interrupt requests during download, see 3. interrupt requests generated during download. interrupt acceptance figure 23.21 timing of contention between sco download request and interrupt request 2. operation when contention occurs operation differs according to the type of interrupt with which the sco download request has conflicted. ? nmi, ubc, and h-udi interrupt requests operation for when these interrupts conflict with the sco download request is described below. contention between sco and interrupt main processing sco download processing interrupt processing, e.g. nmi figure 23.22 contention between interrupts (e.g. nmi)
rev. 3.0, 09/04, page 891 of 1086 ? the nmi, ubc, or h-udi interrupt processing is started. processing proceeds up to the point where sr and pc are saved, the vector is fetched, and the start instruction of the interrupt processing routine is fetched. ? at this point, the sco download request with a higher priority occurs. the sco download processing is started. ? after the download processing has ended, the interrupt processing routine (e.g. nmi) that was in the middle of execution resumes from the point of fetching the start instruction of the interrupt processing routine. ? the interrupt processing routine is ended, and execution returns to the main processing. ? irq and on-chip peripheral module interrupt requests operation for when these interrupts conflict with the sco download request is described below. contention between sco and interrupt main processing sco download processing interrupt processing, e.g. irq figure 23.23 contention between interrupts (e.g. irq) ? an irq interrupt or interrupt from an on-chip peripheral module is replaced with the sco download request and download is executed. ? if the irq or on-chip peripheral module interrupt is still being requested when the download processing has ended, the interrupt processing is executed. if these interrupt requests have been canceled, execution returns to the main processing. ? an interrupt request is canceled when the irq signal, for which low-level detection is set, has been driven high before download ends. also refer to the description below (3. interrupt requests generated during download). 3. interrupt requests generated during download even though an interrupt is requested during sco download, the interrupt processing is not executed until download ends. note that interrupt requests are basically retained, so that on completion of download, the interrupt processing starts. when more than one type of interrupts are requested, their priorities are judged by the interrupt controller (intc), and execution starts from the interrupt processing with higher priority.
rev. 3.0, 09/04, page 892 of 1086 ? nmi, ubc, and h-udi interrupt requests when these interrupt requests occur during sco download, their interrupt sources are retained. ? irq interrupt request falling-edge detection or low-level detection can be specified for an irq interrupt. ? falling-edge detection is selected: when the falling-edge of irq is detected during sco download, the interrupt source is retained. ? low-level detection is selected: when the low-level of irq is detected during sco download, if the irq remains low when download ends, the interrupt processing starts. if the irq is high when download ends, the interrupt source will be canceled. ? on-chip peripheral module interrupt request an interrupt from an on-chip peripheral module is requested by input of the specified level. since the interrupt signal continues to be output unless the interrupt flag is cleared, the interrupt source is retained. (2) interrupts during programming/erasing though an interrupt processing can be executed at realtime during programming/erasing of the downloaded on-chip program, the following limitations and notes are applied. 1. when flash memory is being programmed or erased, both the user mat and user boot mat cannot be accessed. prepare the interrupt vector table and interrupt processing routine in on-chip ram or external memory. make sure the flash memory being programmed or erased is not accessed by the interrupt processing routine. if flash memory is read, the read values are not guaranteed. if the relevant bank in flash memory that is being programmed or erased is accessed, the error protection state is entered, and programming or erasing is aborted. if a bank other than the relevant bank is accessed, the error protection state is not entered but the read values are not guaranteed. 2. do not rewrite the program data specified by the fmpdr parameter. if new program data is to provided by the interrupt processing, temporarily save the new program data in another area. after confirming the completion of programming, save the new program data in the area specified by fmpdr or change the setting in fmpdr to indicated the other area in which the new program data was temporarily saved. 3. make sure the interrupt processing routine does not rewrite the contents of the flash- memory related registers or data in the downloaded on-chip program area. during the interrupt processing, do not simultaneously perform ram emulation, download of the on- chip program by an sco request, or programming/erasing. 4. at the beginning of the interrupt processing routine, save the cpu register contents. before returning from the interrupt processing, write the saved contents in the cpu registers again. 5. when a transition is made to sleep mode or software standby mode in the interrupt processing routine, the error protection state is entered and programming/erasing is aborted. if a transition is made to the reset state, the reset signal should only be released after
rev. 3.0, 09/04, page 893 of 1086 providing a reset input over a period longer than the normal 100 s to reduce the damage to flash memory. 23.8.3 other notes 1. download time of on-chip program the programming program that includes the initialization routine and the erasing program that includes the initialization routine are each 2 kbytes or less. accordingly, when the cpu clock frequency is 40 mhz, the download for each program takes approximately 75 s at maximum. 2. user branch processing intervals the intervals for executing the user branch processing differs in programming and erasing. the processing phase also differs. table 23.11 lists the maximum and minimum intervals for initiating the user branch processing when the cpu clock frequency is 40 mhz. table 23.11 initiation intervals of user branch processing processing name maximum interval minimum interval programming approximately 1 ms approximately 17 s erasing approximately 5 ms approximately 17 s however, when operation is done with cpu clock of 40 mhz, maximum and minimum values of the time until initial user branch processing are as shown in table 23.12. table 23.12 initial user branch processing time processing name max. min. programming approximately 113 s approximately 113 s erasing approximately 85 s approximately 45 s 3. write to flash-memory related registers by aud or dmac while an instruction in on-chip ram is being executed, the aud or dmac can write to the sco bit in fccs that is used for a download request or fmats that is used for mat switching. make sure that these registers are not accidentally written to, otherwise an on-chip program may be downloaded and damage ram or a mat switchover may occur and the cpu get out of control. 4. state in which aud operation is disabled and interrupts are ignored in the following modes or period, the aud is in module standby mode and cannot operate. the nmi or maskable interrupt requests are ignored; they are not executed and the interrupt sources are not retained. ? boot mode ? programmer mode
rev. 3.0, 09/04, page 894 of 1086 ? checking the flash-memory related registers immediately after user boot mode is initiated (approximately 100 s if operation is done at an internal frequency of 40 mhz after the reset signal is released) 5. compatibility with programming/erasing program of conventional f-ztat sh microcomputer a programming/erasing program for flash memory used in the conventional f-ztat sh microcomputer which does not support download of the on-chip program by a sco transfer request cannot run in this lsi. be sure to download the on-chip program to execute programming/erasing of flash memory in this lsi. 6. monitoring runaway by wdt unlike the conventional f-ztat sh microcomputer, no countermeasures are available for a runaway by wdt during programming/erasing by the downloaded on-chip program. prepare countermeasures (e.g. use of the user branch routine and periodic timer interrupts) for wdt while taking the programming/erasing time into consideration as required. 23.9 programmer mode along with its on-board programming mode, this lsi also has programmer mode as another mode for writing and erasing of programs and data. programmer mode supports memory-read mode, auto-program mode, auto-erase mode, and status-read mode. programming/erasing is possible on the user mat and user boot mat. a status-polling system is adopted for operation in auto-program mode, auto-erase mode, and status-read mode. in status-read mode, details of the system's internal state are output after execution of automatic programming or automatic erasure. in programmer mode, set the mode pins as shown in table 23.13, and provide a 6-mhz input-clock signal. table 23.13 programmer mode pin settings pin name settings mode pins: md2, md1, and md0 0, 1, 1 fwe high-level input (automatic programming and automatic erasure) res power-on reset circuit extal, xtal, pllv cc , pllv ss , pllcap oscillation circuit and pll circuit v cl internal stepdown stabilization capacitor
rev. 3.0, 09/04, page 895 of 1086 23.9.1 pin arrangement of socket adapter attach the socket adapter to the lsi in the way shown in figure 23.25. this allows conversion to 40 pins. figure 23.24 shows the memory mapping of on-chip rom, and figure 23.25 shows the arrangement of the socket adapter's pins. h'0000,0000 h'000f,ffff address in mcu mode address in mcu mode address in prom mode address in prom mode h'0,0000 h'f,ffff h'0000,0000 h'0000,1fff h'0,0000 h'0,1fff on-chip rom space (user boot mat) 8 kbytes on-chip rom space (user mat) 1 mbyte figure 23.24 mapping of on-chip flash memory
rev. 3.0, 09/04, page 896 of 1086 sh7058f pin name pin no. pin no. 7a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 d0 d1 d2 d3 d4 d5 d6 d7 fwe vcc vss xtal extal pllvcc pllcap pllvss vcl nc (open) 8 9 10 12 14 15 16 17 18 19 21 23 24 25 26 27 28 29 63 64 65 66 67 68 69 71 218 230 226 56 11,20,39,42,43,46,49,52,55,57, 59,70,75,83,100,101,119,120, 128,139,148,172,187,194,203, 212,237,247 13,22,32,41,44,47,50,54,72,77, 84,85,99,121,126,141,150,163, 174,185,196,205,214,227,239, 249 hn27c4096hg (40 pins) pin name 21 a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 i/00 i/01 i/02 i/03 i/04 i/05 i/06 i/07 fwe vss vcc nc a20 a19 22 23 24 25 26 27 28 29 31 32 33 34 35 36 37 38 39 10 19 a19 31 a19 9 18 17 16 15 14 13 12 2 20 3 4 1,40 11,30 5,6,7 8 9 58 53 51 60 61 62 30,161,225 other power-on reset circuit oscillator circuit pll circuit capacitor fwe i/07 to 0 a19 to 0 socket adapter (40-pin conversion) : flash-write enable : data i/o : address input : chip enable : output enable : write enable figure 23.25 pin arrangement of socket adapter
rev. 3.0, 09/04, page 897 of 1086 23.9.2 programmer mode operation table 23.14 shows the settings for the operating modes of programmer mode, and table 23.15 lists the commands used in programmer mode. the following sections provide detailed information on each mode. ? memory-read mode supports reading from the user mat or user boot mat in bytes. ? auto-program mode supports the simultaneous programming of the user mat and user boot mat in 128-byte units. status polling is used to confirm the end of automatic programming. ? auto-erase mode supports only automatic erasure of the entire user mat or user boot mat. status polling is used to confirm the end of automatic erasure. ? status-read mode status polling is used with automatic programming and automatic erasure. normal completion can be detected by reading the signal on the i/o6 pin. in status-read mode, error information is output when an error has occurred. table 23.14 settings for each operating mode of programmer mode pin name mode fwe ce ce ce ce oe oe oe oe we we we we i/o7 to i/o0 a19 to a0 read h or l l l h data output ain output disable h or l l h h hi-z x command write h or l l h l data input ain * chip disable h or l h x x hi-z x notes: 1. the chip-disable mode is not a standby state; internally, it is an operational state. 2. to write commands when making a transition to auto-program or auto-erase mode, input a high-level signal on the fwe pin. * ain indicates that there is also an address input in auto-program mode.
rev. 3.0, 09/04, page 898 of 1086 table 23.15 commands in programmer mode 1st cycle 2nd cycle command numberof cycles memory mat to be accessed mode address data mode address data user mat write x h'00 memory-read mode 1+n user boot mat write x h'05 read ra dout user mat write x h'40 auto-program mode 129 user boot mat write x h'45 write wa din user mat write x h'20 h'20 auto-erase mode 2 user boot mat write x h'25 write x h'25 status-read mode 2 common to both mats write x h'71 write x h'71 notes 1. in auto-program mode, 129 cycles are required in command writing because of the simultaneous 128-byte write. 2. in memory read mode, the number of cycles varies with the number of address writing cycles (n). 3. in an automatic erasure command, input the same command code for the 1st and 2nd cycles (for erasing of the user boot mat, input h'25 for the 1st and 2nd cycles). 23.9.3 memory-read mode (1) on completion of automatic programming, automatic erasure, or status read, the lsi enters a command input wait state. so, to read the contents of memory after these operations, issue the command to transit to memory-read mode before reading from the memory. (2) in memory-read mode, the writing of commands is possible in the same way as in command input wait state. (3) after entering memory-read mode, continuous reading is possible. (4) after power has first been supplied, the lsi enters memory-read mode. for the ac characteristics in memory read mode, see section 23.10.2, ac characteristics and timing in programmer mode.
rev. 3.0, 09/04, page 899 of 1086 23.9.4 auto-program mode (1) in auto-program mode, programming is in 128-byte units. that is, 128 bytes of data are transferred in succession. (2) even in the programming of less than 128 bytes, 128 bytes of data must be transferred. h'ff should be written to those addresses that are unnecessarily written to. (3) set the lower seven bits of the address to be transferred to low level. inputting an invalid address will result in a programming error, although processing will proceed to the memory- programming operation. (4) the memory address is transferred in the 2nd cycle. do not transfer addresses in the 3rd or later cycles. (5) do not issue commands while programming is in progress. (6) when programming, execute automatic programming once for each 128-byte block of addresses. programming the block at an address where programming has already been performed is not possible. (7) to confirm the end of automatic programming, check the signal on the i/o6 pin. confirmation in status-read mode is also possible (status polling of the i/o7 pin is used to check the end status of automatic programming). (8) status-polling information on the i/o6 and i/o7 pins is retained until the next command is written. as long as no command is written, the information is made readable by enabling ce and oe . for the ac characteristics in auto-program mode, see section 23.10.2, ac characteristics and timing in programmer mode. 23.9.5 auto-erase mode (1) auto-erase mode only supports erasing of the entire memory. (2) do not perform command writing while auto erasing is in progress. (3) to confirm the end of automatic erasure, check the signal on the i/o6 pin. confirmation in the status-read mode is also possible (status polling of the i/o7 pin is used to check the end status of automatic erasure). (4) status polling information on the i/o6 and i/o7 pins is retained until the next command writing. as long as no command is written, the information is made readable by enabling ce and oe . for the ac characteristics in auto-erase mode, see section 23.10.2, ac characteristics and timing in programmer mode.
rev. 3.0, 09/04, page 900 of 1086 23.9.6 status-read mode (1) status-read mode is used to determine the type of an abnormal termination. use this mode when automatic programming or automatic erasure ends abnormally. (2) the return code is retained until writing of a command that selects a mode other than status- read mode. table 23.16 lists the return codes of status-read mode. for the ac characteristics in status-read mode, see section 23.10.2, ac characteristics and timing in programmer mode. table 23.16 return codes of status-read mode pin name i/o7 i/o6 i/o5 i/o4 i/o3 i/o2 i/o1 i/o0 attribute normal end indicator command error programming error erasure error ? ? programming or erase count exceeded invalid address error initial value 0 0 0 0 000 0 indication normal end: 0 abnormal end: 1 command error: 1 otherwise : 0 programming error: 1 otherwise: 0 erasure error:1 otherwise: 0 ? ? count exceeded: 1 otherwise: 0 invalid address error: 1 otherwise: 0 note: i/o2 and i/o3 are undefined pins. 23.9.7 status polling (1) the i/o7 status-polling output is a flag that indicates the operating status in auto-program or auto-erase mode. (2) the i/o6 status-polling output is a flag that indicates normal/abnormal end of auto-program or auto-erase mode. table 23.17 truth table of status-polling output pin name in progress abnormal end ? normal end i/o70101 i/o60011 i/o0 to i/o50000
rev. 3.0, 09/04, page 901 of 1086 23.9.8 time taken in transition to programmer mode until oscillation has stabilized and while programmer mode is being set up, the lsi is unable to accept commands. after the programmer-mode setup time has elapsed, the lsi enters memory- read mode. for details, see section 23.10.2, ac characteristics and timing in programmer mode. 23.9.9 notes on programming in programmer mode (1) when programming addresses which have previously been programmed, apply auto-erasing before auto-programming. (2) when using programmer mode to program a chip that has been programmed/erased in an on- board programming mode, auto-erasing before auto-programming is recommended. (3) do not take the chip out of the prom programmer or reset the chip during programming or erasure. flash memory is susceptible to permanent damage since a high voltage is being applied during the programming/erasing. when the reset signal is accidentally input to the chip, the period in the reset state until the reset signal is released should be longer than the normal 100 s. notes: 1. the flash memory is initially in the erased state when the device is shipped by renesas technology. for other chips for which the history of erasure is unknown, auto-erasing as a check and supplement for the initialization (erase) level is recommended. 2. automatic programming to a single address block can only be performed once. additional programming to an address block that has already been programmed is not allowed. 23.10 further information 23.10.1 serial communication interface specification for boot mode initiating boot mode enables the boot program to communicate with the host by using the on-chip sci. the serial communication interface specifications are shown below. ? status the boot program has three states. (1) bit-rate-adjustment state in this state, the boot program adjusts the bit rate to communicate with the host. initiating boot mode enables starting of the boot program and entry to the bit-rate-adjustment state. the program receives the command from the host to adjust the bit rate. after adjusting the bit rate, the program enters the inquiry/selection state.
rev. 3.0, 09/04, page 902 of 1086 (2) inquiry/selection state in this state, the boot program responds to inquiry commands from the host. the device name, clock mode, and bit rate are selected. after selection of these settings, the program is made to enter the programming/erasing state by the command for a transition to the programming/erasing state. the boot program transfers the erasure program to ram and erases the user mats and user boot mats before the transition. (3) programming/erasing state programming and erasure by the boot program take place in this state. the boot program is made to transfer the programming/erasing program to ram by commands from the host. sum checks and blank checks are executed by sending these commands from the host. these boot program states are shown in figure 23.26.
rev. 3.0, 09/04, page 903 of 1086 programming/erasing selection wait user mat/user boot mat erasing processing bit rate adjustment inquiry/selection wait selection processing inquiry processing programming processing erasing processing check processing programming erasing check reset inquiry transition to programming/ erasing state selection bit-rate-adjustment state inquiry/selection state programming/erasing state figure 23.26 boot program processing flow ? bit-rate-adjustment state the bit rate is calculated by measuring the period of transfer of a low-level byte (h'00) from the host. the bit rate can be changed by the command for a new bit rate selection. after the bit rate has been adjusted, the boot program enters the inquiry/selection state. the bit-rate- adjustment sequence is shown in figure 23.27.
rev. 3.0, 09/04, page 904 of 1086 host boot program h'00 (30 times maximum) h'e6 (response to boot) measuring the 1-bit length h'00 (completion of adjustment) h'55 h'ff (error) figure 23.27 bit-rate-adjustment sequence ? communications protocol after adjustment of the bit rate, the protocol for serial communications between the host and the boot program is as shown below. (1) one-byte commands and one-byte responses these commands and responses are comprised of a single byte. these consists of the inquiries and ack for successful completion. (2) n-byte commands or n-byte responses these commands and responses are comprised of n bytes of data. these are selections and responses to inquiries. the amount of programming data is not included under this heading because it is determined in another command. (3) error response the error response is a response to inquiries. it consists of an error response and an error code and which take up two bytes. (4) programming of 128 bytes the size is not specified in commands. the data size is indicated in response to the programming unit inquiry. (5) memory read response this response consists of four bytes of data.
rev. 3.0, 09/04, page 905 of 1086 command or response data size data checksum error response error code command or response error response n-byte command or n-byte response 1-byte command or 1-byte response address command data (n bytes) checksum 128-byte programming data size response data checksum memory read response figure 23.28 communications protocol format ? command (one byte): commands including inquiries, selection, programming, erasing, and checking ? response (one byte): response to an inquiry ? size (one or two bytes): the amount of data for transmission excluding the command, amount of data, and checksum ? data (n bytes): detailed data of a command or response ? checksum (one byte): the checksum is calculated so that the total of all values from the command byte to the sum byte becomes h'00. ? error response (one byte): error response to a command ? error code (one byte): type of the error ? address (four bytes): address for programming ? data (n bytes): data to be programmed. n is indicated in the response to the programming unit inquiry. ? data size (four bytes): four-byte response to a memory read ? inquiry/selection state the boot program returns information from the flash memory in response to the host's inquiry commands and sets the device code, clock mode, and bit rate in response to the host's selection command. table 23.18 lists the inquiry and selection commands.
rev. 3.0, 09/04, page 906 of 1086 table 23.18 inquiry and selection commands command command name description h'20 supported device inquiry inquiry regarding device codes and product names of f-ztat h'10 device selection selection of device code h'21 clock mode inquiry inquiry regarding numbers of clock modes and values of each mode h'11 clock mode selection indication of the selected clock mode h'22 multiplication ratio inquiry inquiry regarding the number of clock types, the number of multiplication/division ratios, and the multiplication/division ratios h'23 operating clock frequency inquiry inquiry regarding the maximum and minimum values of the main clock and peripheral clocks h'24 user boot mat information inquiry inquiry regarding the number of user boot mats and the start and last addresses of each mat h'25 user mat information inquiry inquiry regarding the a number of user mats and the start and last addresses of each mat h'26 block for erasing information inquiry inquiry regarding the number of blocks and the start and last addresses of each block h'27 programming unit inquiry inquiry regarding the unit of programming data h'3f new bit rate selection selection of new bit rate h'40 transition to programming/erasing state erasing of user mat and user boot mat, and entry to programming/erasing state h'4f boot program status inquiry inquiry into the operation status of the boot program the selection commands, which are device selection (h'10), clock mode selection (h'11), and new bit rate selection (h'3f), should be sent from the host in this order. these commands are certainly required. when two or more selection commands are sent at once, the last command will be valid. all of these commands, except for the boot program status inquiry command (h'4f), will be valid until the boot program receives the programming/erasing transition (h'40). the host can choose the needed commands out of the commands and inquiries listed above. the boot program status inquiry command (h'4f) is valid after the boot program has received the programming/erasing transition command (h'40).
rev. 3.0, 09/04, page 907 of 1086 (1) supported device inquiry the boot program will return the device codes of supported devices in response to the supported device inquiry. command h'20 ? command: h'20 (one byte): inquiry regarding supported devices response h'30 size number of devices number of characters device code product name ? sum ? response: h'30 (one byte): response to the supported device inquiry ? size (one byte): number of bytes to be transmitted, excluding the command, amount of data, and checksum, that is, the amount of data consists of the product names, the number of devices, characters, and device codes ? number of devices (one byte): number of device types supported by the boot program ? number of characters (one byte): number of characters in the device code and boot program's name ? device code (four bytes): supporting product (ascii code) ? product name (n bytes): type name of the boot program (ascii code) ? sum (one byte): checksum the checksum is calculated so that the total number of all values from the command byte to the sum byte becomes h'00. (2) device selection the boot program will set the supported device to the specified device code. the program will return the selected device code in response to the inquiry after this setting has been made. command h'10 size device code sum ? command: h'10 (one byte): device selection ? size (one byte): number of characters in the device code (fixed at 2) ? device code (four bytes): device code returned in response to the supported device inquiry (ascii code) ? sum (one byte): checksum response h'06 ? response: h'06, (one byte): response to the device selection command ack will be returned when the device code matches. error response h'90 error ? error response: h'90 (one byte): error response to the device selection command
rev. 3.0, 09/04, page 908 of 1086 ? error: (one byte): error code h'11: sum check error h'21: device code mismatch error (3) clock mode inquiry the boot program will return the supported clock modes in response to the clock mode inquiry. command h'21 ? command: h'21 (one byte): inquiry regarding clock mode response h'31 size number of modes mode sum ? response: h'31 (one byte): response to the clock-mode inquiry ? size (one byte): amount of data that represents the number of modes and modes ? number of modes (one byte): number of supported clock modes h'00 indicates no clock mode or the device allows the clock mode to be read. ? mode (one byte): supported clock modes (i.e. h'01 means clock mode 1.) ? sum (one byte): checksum (4) clock mode selection the boot program will set the specified clock mode. the program will return the selected clock-mode information after this setting has been made. the clock-mode selection command should be sent after the device selection command. command h'11 size mode sum ? command: h'11 (one byte): selection of clock mode ? size (one byte): number of characters that represents the mode (fixed at 1) ? mode (one byte): clock mode returned in reply to the supported clock mode inquiry. ? sum (one byte): checksum response h'06 ? response: h'06 (one byte): response to the clock-mode selection command ack will be returned when the clock mode matches. error response h'91 error ? error response: h'91 (one byte): error response to the clock-mode selection command ? error (one byte): error code h'11: sum check error h'22: clock mode mismatch error (5) multiplication ratio inquiry the boot program will return the supported multiplication/division ratios. command h'22 ? command: h'22 (one byte): inquiry regarding multiplication ratio
rev. 3.0, 09/04, page 909 of 1086 response h'32 size number of clock types number of multiplication ratios multiplica- tion ratio ? ? sum ? response: h'32 (one byte): response to the multiplication ratio inquiry ? size (one byte): amount of data that represents the number of clock types, the number of multiplication ratios, and the multiplication ratios ? number of clock types (one byte): number of supported multiplied clock types (e.g. when there are two multiplied clock types, which are the main operating frequency and the peripheral module operating frequency, the number of types will be h'02) ? number of multiplication ratios (one byte): number of multiplication ratios for each operating frequency (e.g. the number of multiplication ratios to which the main operating frequency can be set and the peripheral module operating frequency can be set) ? multiplication ratio (one byte) multiplication ratio : value of the multiplication ratio (e.g. when the clock-frequency multiplier is four, the value of multiplication ratio will be h'04) division ratio: value of the division ratio, inverted to be a negative number (e.g. when the clock is divided by two, the value of division ratio will be h'fe. h'fe = ? 2) the number of multiplication ratios returned is the same as the number of multiplication ratios and as many groups of data are returned as there are types. ? sum (one byte): checksum (6) operating clock frequency inquiry the boot program will return the number of operating clock frequencies, and the maximum and minimum values. command h'23 ? command: h'23, (one byte): inquiry regarding operating clock frequencies response h'33 size number of operating clock frequencies minimum value of operating clock frequency maximum value of operating clock frequency ? sum ? response: h'33 (one byte): response to operating clock frequency inquiry ? size (one byte): number of bytes that represents the number of types, minimum values, and maximum values of operating clock frequencies.
rev. 3.0, 09/04, page 910 of 1086 ? number of types (one byte): number of supported operating clock frequency types (e.g. when there are two operating clock frequency types, which are the main and peripheral clocks, the number of types will be h'02) ? minimum value of operating clock frequency (two bytes): minimum value for each multiplied or divided clock frequency. the minimum and maximum values represent the values in mhz, valid to the hundredths place of mhz, and multiplied by 100. (e.g. when the value is 20.00 mhz, it will be multiplied by 100 to be 2000 which is h?07d0) ? maximum value of operating clock frequency (two bytes): maximum value for each multiplied or divided clock frequency. there are as many pairs of minimum and maximum values as there are operating clock frequencies. ? sum (one byte): checksum (7) user boot mat information inquiry the boot program will return the number of user boot mats and their addresses. command h'24 ? command: h'24 (one byte): inquiry regarding user boot mat information response h'34 size number of areas start address of area last address of area ? sum ? response: h'34 (one byte): response to user boot mat information inquiry ? size (one byte): amount of data that represents the number of areas, the start address of each area, and the last address of each area ? number of areas (one byte): number of non-consecutive user boot mat areas when user boot mat areas are consecutive, the number of areas returned is h'01. ? start address of area (four bytes): start address of the area ? last address of area (four bytes): last address of the area there are as many groups of data representing the start and last addresses as there are areas. ? sum (one byte): checksum (8) user mat information inquiry the boot program will return the number of user mats and their addresses. command h'25 ? command: h'25 (one byte): inquiry regarding user mat information
rev. 3.0, 09/04, page 911 of 1086 response h'35 size number of areas start address of area last address of area ? sum ? response: h'35 (one byte): response to the user mat information inquiry ? size (one byte): amount of data that represents the number of areas, the start address of each area, and the last address of each area ? number of areas (one byte): number of non-consecutive user mat areas when user mat areas are consecutive, the number of areas returned is h'01. ? start address of area (four bytes): start address of the area ? last address of area (four bytes): last address of the area there are as many groups of data representing the start and last addresses as there are areas. ? sum (one byte): checksum (9) erased block information inquiry the boot program will return the number of erased blocks and their addresses. command h'26 ? command: h'26 (one byte): inquiry regarding erased block information response h'36 size number of blocks start address of block last address of block ? sum ? response: h'36 (one byte): response to the number of erased blocks and addresses ? size (two bytes): amount of data that represents the number of blocks, the start address of each block, and the last address of each block ? number of blocks (one byte): number of erased blocks in flash memory ? start address of block (four bytes): start address of the block ? last address of block (four bytes): last address of the block there are as many groups of data representing the start and last addresses as there are blocks. ? sum: checksum (10) programming unit inquiry the boot program will return the programming unit used to program data. command h'27 ? command: h'27 (one byte): inquiry regarding programming unit response h'37 size programming unit sum ? response: h'37 (one byte): response to programming unit inquiry ? size (one byte): number of characters that indicate the programming unit (fixed at 2)
rev. 3.0, 09/04, page 912 of 1086 ? programming unit (two bytes): unit for programming this is the unit for reception of program data. ? sum (one byte): checksum (11) inquiry of two-mat simultaneous programming for an inquiry of two-mat simultaneous programming, the boot program returns the response whether two-mat simultaneous programming is possible or not, and the start address. command h'28 ? command: h'28 (one byte): inquiry of two-mat simultaneous programming response h'38 size programming method first mat start address second mat start address sum ? response: h'38 (one byte): response to the inquiry of two-mat simultaneous programming ? size (one byte): total amount of programming method and mat start address 5 bytes when programming to one mat, 9 bytes when programming to two mats simultaneously ? programming method (one byte): h'01 = one-mat programming h'02 = two-mat simultaneous programming ? first mat start address (four bytes): first mat start address ? second side mat start address four bytes): second mat start address ? data on second mat start address is available only when two-mat simultaneous programming is possible. ? sum (one byte): checksum (12) new bit rate selection the boot program will set a new bit rate and return the new bit rate. this selection should be sent after sending the clock-mode selection command. command h'3f size bit rate input frequency number of multiplication ratios multiplication ratio 1 multiplication ratio 2 sum ? command: h'3f (one byte): selection of new bit rate ? size (one byte): amount of data that represents the bit rate, input frequency, number of multiplication ratios, and multiplication ratios ? bit rate (two bytes): new bit rate one hundredth of the value (e.g. when the value is 19200 bps, the bit rate is 192, which is h?00c0)
rev. 3.0, 09/04, page 913 of 1086 ? input frequency (two bytes): frequency of the clock input to the boot program this value is valid to the hundredths place and represents the value in mhz multiplied by 100. (e.g. when the value is 28.88 mhz, it will be multiplied by 100 to be 2888 which is h?0b48. ? number of multiplication ratios (one byte): number of multiplication ratios to which the device can be set. ? multiplication ratio 1 (one byte): value of the multiplication or division ratio for the main operating frequency multiplication ratio: value of the multiplication ratio (e.g. when the clock frequency is multiplied by four, the multiplication ratio will be h'04.) division ratio: value of the division ratio, inverted to be a negative number (e.g. when the clock is divided by two, the value of division ratio will be h'fe. h'fe = ? 2) ? multiplication ratio 2 (one byte): value of the multiplication or division ratio for the peripheral operating frequency multiplication ratio: value of the multiplication ratio (e.g. when the clock frequency is multiplied by four, the multiplication ratio will be h'04.) division ratio: value of the division ratio, inverted to be a negative number (e.g. when the clock is divided by two, the value of division ratio will be h'fe. h'fe = ? 2) ? sum (one byte): checksum response h'06 ? response: h'06 (one byte): response to selection of a new bit rate when it is possible to set the bit rate, the response will be ack. error response h'bf error ? error response: h'bf (one byte): error response to selection of new bit rate ? error: (one byte): error code h'11: sum check error h'24: bit-rate selection error this bit rate is not available. h'25: input frequency error this input frequency is not within the range set by the minimum and maximum values. h'26: multiplication ratio error this ratio does not match an available ratio. h'27: operating frequency error this operating frequency is not within the range set by the minimum and maximum values. the methods for checking of received data are listed below. ? input frequency the received value of the input frequency is checked to ensure that it is within the range of minimum to maximum frequencies which matches the clock modes of the specified device. when the value is out of this range, an input frequency error is generated.
rev. 3.0, 09/04, page 914 of 1086 ? multiplication ratio the received value of the multiplication ratio or division ratio is checked to ensure that it matches the clock modes of the specified device. when the value is out of this range, a multiplication error is generated. ? operating frequency error the operating frequency is calculated from the received value of the input frequency and the multiplication or division ratio. the input frequency is input to the lsi and the lsi is actually operated at the operating frequency. the expression is given below. operating frequency = input frequency*multiplication ratio, or operating frequency = input frequency/division ratio the calculated operating frequency should be checked to ensure that it is within the range of minimum to maximum frequencies which are available with the clock modes of the specified device. when it is out of this range, an operating frequency error is generated. ? bit rate from peripheral operating clock ( ) and bit rate (b), the clock select (cks) value (n) in the serial mode register (smr) and the bit rate register (brr) value (n) are obtained. the error between n and n that is calculated by the method below is checked to ensure that it is less than 4%. when it is 4% or more, a bit-rate selection error is generated. error (%) = {[ ] ? 1} ? 100 (n+1) ? b ? 64 ? 2 (2n-1) ? 10 6 when the new bit rate is selectable, the new bit rate will be set in the register after sending ack in response. the host will send ack with the new bit rate for confirmation and the boot program will response with that rate. confirmation h'06 ? confirmation: h'06 (one byte): confirmation of a new bit rate response h'06 ? response: h'06 (one byte): response to confirmation of a new bit rate the sequence of new bit-rate selection is shown in figure 23.29.
rev. 3.0, 09/04, page 915 of 1086 host boot program setting a new bit rate h'06 (ack) waiting for one-bit period at the specified bit rate h'06 (ack) with the new bit rate h'06 (ack) with the new bit rate setting a new bit rate setting a new bit rate figure 23.29 new bit-rate selection sequence transition to programming/erasing state: to enter the programming/erasing state, the boot program will transfer the erasing program, and erase the user mats and user boot mats in that order. on completion of this erasure, ack will be returned and a transition is made to the programming/erasing state. the host should select the device code, clock mode, and new bit rate with device selection, clock- mode selection, and new bit-rate selection commands, and then send the command for the transition to programming/erasing state. this procedure should be carried out before transferring the programming selection command or program data. command h'40 ? command: h'40 (one byte): transition to programming/erasing state response h'06 ? response: h'06 (one byte): response to transition to programming/erasing state the boot program will send ack when the user mats and user boot mats have been erased by the transferred erasing program. error response h'c0 h'51 ? error response: h'c0 (one byte): error response to transition to programming/erasing state ? error code: h'51 (one byte): erasing error an error occurred and erasure was not completed. command error: a command error will occur when a command is undefined, the order of commands is incorrect, or a command is unacceptable. issuing a clock-mode selection command before a device selection or issuing an inquiry command after the command for transition to the programming/erasing state, are examples. error response h'80 h'xx ? error response: h'80 (one byte): command error
rev. 3.0, 09/04, page 916 of 1086 ? command: h'xx (one byte): received command command order: the order for commands in the inquiry selection state is shown below. (1) a supported device inquiry (h'20) should be made to inquire about the supported devices. (2) the device should be selected from among those described by the returned information and set with a device selection (h'10) command. (3) a clock-mode inquiry (h'21) should be made to inquire about the supported clock modes. (4) the clock mode should be selected from among those described by the returned information and set with a clock-mode selection (h'11) command. (5) after selection of the device and clock mode, inquiries for other required information should be made, such as the multiplication ratio inquiry (h'22) or operating frequency inquiry (h'23). (6) a new bit rate should be selected with the new bit-rate selection (h'3f) command, according to the returned information on multiplication ratios and operating frequencies. (7) after selection of the device and clock mode, the information of the user boot mat and user mat should be made to inquire about the user boot mat information inquiry (h'24), user mat information inquiry (h'25), erased block information inquiry (h'26), programming unit inquiry (h'27), and two-mat simultaneous programming information inquiry (h'28). (8) after making inquiries and selecting a new bit rate, issue the command for transition to the programming/erasing state (h'40). the boot program will then enter the programming/erasing state. programming/erasing state: in the programming/erasing state, a programming selection command makes the boot program select the programming method, a 128-byte programming command makes it program the memory with data, and an erasing selection command and block erasing command make it erase the block. table 23.19 lists the programming/erasing commands.
rev. 3.0, 09/04, page 917 of 1086 table 23.19 programming/erasing commands command command name description h'42 user boot mat programming selection transfers the user boot mat programming program h'43 user mat programming selection transfers the user mat programming program h'50 128-byte programming programs 128 bytes of data h'48 erasing selection transfers the erasing program h'58 block erasing erases a block of data h'52 memory read reads the contents of memory h'4a user boot mat sum check checks the checksum of the user boot mat h'4b user mat sum check checks the checksum of the user mat h'4c user boot mat blank check checks whether the contents of the user boot mat are blank h'4d user mat blank check checks whether the contents of the user mat are blank h'4f boot program status inquiry inquires into the boot program's state programming: programming is executed by a programming selection command and a 128-byte programming command. first, the host should send the programming selection command and select the programming method and programming mats. there are three programming selection commands used according to the area and method for programming. (1) user boot mat programming selection (2) user mat programming selection (3) two-user-mat simultaneous programming selection after issuing the programming selection command, the host should send the 128-byte programming command. the 128-byte programming command that follows the selection command represents the data programmed according to the method specified by the selection command. when more than 128-byte data is programmed, 128-byte commands should repeatedly be executed. sending a 128-byte programming command with h'ffffffff as the address will stop the programming. on completion of programming, the boot program will wait for selection of programming or erasing. to continue programming with another method or of another mat, the procedure must be repeated from the programming selection command.
rev. 3.0, 09/04, page 918 of 1086 the programming selection command and sequence for the 128-byte programming commands are shown in figure 23.30. transfer of the programming program host boot program programming selection (h'42, h'43, h'44) ack programming 128-byte programming (address, data) ack 128-byte programming (h'ffffffff) ack repeat figure 23.30 programming sequence (1) user boot mat programming selection the boot program will transfer a programming program. the data is programmed to the user boot mats by the transferred programming program. command h'42 ? command: h'42 (one byte): user boot mat programming selection response h'06 ? response: h'06 (one byte): response to user boot mat programming selection when the programming program has been transferred, the boot program will return ack. error response h'c2 error ? error response: h'c2 (one byte): error response to user boot mat programming selection ? error: (one byte): error code h'54: selection processing error (transfer error occurs and processing is not completed) (2) user mat programming selection the boot program will transfer a programming program. the data is programmed to the user mats by the transferred programming program. command h'43 ? command: h'43 (one byte): user mat programming selection
rev. 3.0, 09/04, page 919 of 1086 response h'06 ? response: h'06 (one byte): response to user mat programming selection when the programming program has been transferred, the boot program will return ack. error response h'c3 error ? error response: h'c3 (one byte): error response to user mat programming selection ? error: (one byte): error code h'54: selection processing error (transfer error occurs and processing is not completed) (3) selection of two-user-boot mat simultaneous programming in response to the selection of two-user-boot mat simultaneous programming, the boot program transfers a program for the two-user-boot mat simultaneous programming. the transferred program for the two-user-boot mat simultaneous programming is used to program data onto two user boot mats simultaneously. taking into account two-mat simultaneous write, addresses and data corresponding to the two mats should be alternately transmitted at the host side. though the boot program returns ack each time one 128-byte programming command is given, data is not programming until data for two user boot mats is completely prepared. command h'44 ? command: command: h'44 (one byte): selection of two-user-boot mat simultaneous programming response h'06 ? response: h'06 (one byte): response to the selection of two-user-boot mat simultaneous programming. ack is given when the programming program has been transferred. error response h'c4 error ? error response: h'c4 (one byte): error response to the selection of two-user-boot mat simultaneous programming ? error: (one byte): error code h'54: selection processing error (transfer error occurs and processing is not completed) (4) 128-byte programming the boot program will use the programming program transferred by the programming selection command for programming the user boot mats or user mats. when two-user- mat simultaneous programming command is selected, programming will start after the boot program has received data for both mats. command h'50 programming address data ? ? sum ? command: h'50 (one byte): 128-byte programming
rev. 3.0, 09/04, page 920 of 1086 ? programming address (four bytes): start address for programming multiple of the size specified in response to the programming unit inquiry; a 128-byte boundary (e.g. h'00, h'01, h'00, h'00: h'01000000) ? data (n bytes): data to be programmed the size is specified in response to the programming unit inquiry. ? sum (one byte): checksum response h'06 ? response: h'06 (one byte): response to 128-byte programming on completion of programming, the boot program will return ack. in two-mat programming, when all data for the first mat has been received, the boot program will return ack. error response h'd0 error ? error response: h'd0 (one byte): error response to 128-byte programming ? error: (one byte): error code h'11: sum check error h'2a: address error (address is not within the specified range) h'53: programming error (a programming error has occurred and programming cannot be continued) the specified address should match the unit for programming of data. for example, when the programming is in 128-byte units, the lower byte of the address should be h'00 or h'80. when there are less than 128 bytes of data to be programmed, the host should fill the rest with h'ff. in two-user-mat simultaneous programming, the host should alternately send the data for each mat address. sending the 128-byte programming command with the address of h'ffffffff will stop the programming operation. the boot program will interpret this as the end of programming and wait for selection of programming or erasing. when the most recently received data has not been programmed in two-user-mat simultaneous programming, the most recent data is programmed before programming is stopped. command h'50 programming address sum ? command: h'50 (one byte): 128-byte programming ? programming address (four bytes): end code is h'ff, h'ff, h'ff, h'ff. ? sum (one byte): checksum error response h'd0 error ? error response: h'd0 (one byte): error response to 128-byte programming
rev. 3.0, 09/04, page 921 of 1086 ? error: (one byte): error code h'11: sum check error h'53: programming error an error has occurred in programming, and programming cannot be continued (in two- user-mat simultaneous programming, when programming to the last mat has not been completed.) erasure: erasure is performed with the erasing selection and block erasing command. first, erasure is selected by the erasing selection command and the boot program then erases the block specified by the block erasing command. the command should be repeatedly executed if two or more blocks are to be erased. sending a block erasing command from the host with the block number h'ff will stop erasure. on completion of erasing, the boot program will wait for selection of programming or erasing. the erasing selection command and sequence for erasing data are shown in figure 23.31. transfer of erasure program host boot program preparation for erasure (h'48) ack erasure erasure (erased block number) erasure (h'ff) ack ack repeat figure 23.31 erasing sequence (1) erasing selection the boot program will transfer the erasing program. user mat data is erased by the transferred erasing program. command h'48 ? command: h'48 (one byte): erasing selection
rev. 3.0, 09/04, page 922 of 1086 response h'06 ? response: h'06 (one byte): response to erasing selection after the erasing program has been transferred, the boot program will return ack. error response h'c8 error ? error response: h'c8 (one byte): error response to erasing selection ? error: (one byte): error code h'54: selection processing error (transfer error occurs and processing is not completed) (2) block erasing the boot program will erase the contents of the specified block. command h'58 size block number sum ? command: h'58 (one byte): erasing ? size (one byte): number of characters that represents the erasure block number (fixed at 1) ? block number (one byte): number of the block whose data is to be erased ? sum (one byte): checksum response h'06 ? response: h'06 (one byte): response to erasing after erasure has been completed, the boot program will return ack. error response h'd8 error ? error response: h'd8 (one byte): error response to erasing h'11: sum check error h'29: block number error block number is incorrect. h'51: erasure error an error has occurred during erasure. on receiving block number h'ff, the boot program will stop erasure and wait for a selection command. command h'58 size block number sum ? command: h'58 (one byte): erasure ? size (one byte): number of characters that represents the block number (fixed at 1) ? block number (one byte): h'ff (stop code for erasure) ? sum (one byte): checksum response h'06 ? response: h'06 (one byte): response to end of erasure (ack) when erasure is to be performed again after the block number h'ff has been sent, the procedure should be executed from the erasure selection command.
rev. 3.0, 09/04, page 923 of 1086 memory read: the boot program will return the data in the specified address. command h'52 size area read start address read size sum ? command: h'52 (one byte): memory read ? size (one byte): amount of data that represents the area, read address, and read size (fixed at 9) ? area (one byte) h'11: user boot mat h'01: user mat an address error occurs when the area setting is incorrect. ? read start address (four bytes): start address to be read from ? read size (four bytes): size of data to be read ? sum (one byte): checksum response h'52 read size data ? sum ? response: h'52 (one byte): response to memory read ? read size (four bytes): size of data to be read ? data (n bytes): data for the read size from the read address ? sum (one byte): checksum error response h'd2 error ? error response: h'd2 (one byte): error response to memory read ? error: (one byte): error code h'11: sum check error h'2a: address error the read address is not in the mat. h'2b: size error the read size exceeds the mat. or, the read end address calculated from the read start address and read size is out of the mat range, or the read size is 0. user boot mat sum check: the boot program will add the amount of data in user boot mats and return the result. command h'4a ? command: h'4a (one byte): sum check of user boot mats response h'5a size mat checksum sum ? response: h'5a (one byte): response to sum check of user boot mats ? size (one byte): number of characters in checksum data (fixed at 4)
rev. 3.0, 09/04, page 924 of 1086 ? mat checksum (four bytes): checksum of user boot mats the total amount of data is obtained in byte units. ? sum (one byte): checksum (for transmit data) user mat sum check: the boot program will add the amount of data in user mats and return the result. command h'4b ? command: h'4b (one byte): sum check of user mats response h'5b size mat checksum sum ? response: h'5b (one byte): response to sum check of user mats ? size (one byte): number of characters in checksum data (fixed at 4) ? mat checksum (four bytes): checksum of user mats the total amount of data is obtained in byte units. ? sum (one byte): checksum (for transmit data) user boot mat blank check: the boot program will check whether or not all user boot mats are blank and return the result. command h'4c ? command: h'4c (one byte): blank check of user boot mats response h'06 ? response: h'06 (one byte): response to blank check of user boot mats if all user boot mats are blank (h'ff), the boot program will return ack. error response h'cc h'52 ? error response: h'cc (one byte): error response to blank check of user boot mats ? error code: h'52 (one byte): erasure has not been completed user mat blank check: the boot program will check whether or not all user mats are blank and return the result. command h'4d ? command: h'4d (one byte): blank check of user mats response h'06 ? response: h'06 (one byte): response to blank check of user mats if all user mats are blank (h'ff), the boot program will return ack. error response h'cd h'52 ? error response: h'cd (one byte): error response to blank check of user mats ? error code: h'52 (one byte): erasure has not been completed.
rev. 3.0, 09/04, page 925 of 1086 boot program status inquiry: the boot program will return indications of its present state and error condition. this inquiry can be made in the inquiry/selection state or the programming/erasing state. command h'4f ? command: h'4f (one byte): inquiry regarding boot program status response h'5f size status error sum ? response: h'5f (one byte): response to inquiry regarding boot program status ? size (one byte): number of characters in data (fixed at 2) ? status (one byte): standard boot program status for details, see table 23.20, status code ? error (one byte): error state error = 0 indicates normal operation. error = 1 indicates error has occurred for details, see table 23.21, error code. ? sum (one byte): checksum table 23.20 status code code description h'01 device selection wait h'02 clock mode selection wait h'03 bit rate selection wait h'0f programming/erasing state transition wait (bit rate selection is completed) h'31 programming state for erasing user mat and user boot mat h'3f programming/erasing selection wait (erasure is completed) h'4f programming data receive wait h'5f erasure block specification wait (erasure is completed)
rev. 3.0, 09/04, page 926 of 1086 table 23.21 error code code description h'00 no error h'11 sum check error h'21 device code mismatch error h'22 clock mode mismatch error h'24 bit rate selection error h'25 input frequency error h'26 multiplication ratio error h'27 operating frequency error h'29 block number error h'2a address error h'2b data length error h'51 erasure error h'52 erasure incompletion error h'53 programming error h'54 selection error h'80 command error h'ff bit-rate-adjustment confirmation error
rev. 3.0, 09/04, page 927 of 1086 23.10.2 ac characteristics and timing in programmer mode table 23.22 ac characteristics in memory read mode condition: v cc = 3.3 v 0.3 v, v ss = 0 v, t a = 25 c 5 c code symbol min max unit note command write cycle t nxtc 20 s ce hold time t ceh 0ns ce setup time t ces 0ns data hold time t dh 50 ns data setup time t ds 50 ns programming pulse width t wep 70 ns we rise time t r 30 ns we fall time t f 30 ns a19-a0 i/o7-i/o0 command write t ceh t ds t dh tf tr t nxtc note : data is latched at the rising edge of . t ces t wep memory read mode address stable figure 23.32 memory read timing after command write
rev. 3.0, 09/04, page 928 of 1086 table 23.23 ac characteristics in transition from memory read mode to others condition: v cc = 3.3 v 0.3 v, v ss = 0 v, t a = 25 c 5 c code symbol min max unit note command write cycle t nxtc 20 s ce hold time t ceh 0ns ce setup time t ces 0ns data hold time t dh 50 ns data setup time t ds 50 ns programming pulse width t wep 70 ns we rise time t r 30 ns we fall time t f 30 ns a19-a0 i/o7-i/o0 command write in another mode t ceh t ds t dh tf tr t nxtc note : and should not be enabled simultaneously. t ces t wep memory read mode address stable figure 23.33 timing at transition from memory read mode to other modes
rev. 3.0, 09/04, page 929 of 1086 table 23.24 ac characteristics in memory read mode condition: v cc = 3.3 v 0.3 v, v ss = 0 v, t a = 25 c 5 c code symbol min max unit note access time t acc 20 s ce output delay time t ce 150 ns oe output delay time t oe 150 ns output disable delay time t df 100 ns data output hold time t oh 5ns a19-a0 i/o7-i/o0 v ih v il v il t acc t oh t oh t acc address stable address stable figure 23.34 ce ce ce ce / oe oe oe oe enable state read a18-a0 i/o7-i/o0 v ih t ce t acc t oe t oh t oh t df t ce t acc t oe address stable address stable t df figure 23.35 ce ce ce ce / oe oe oe oe clock read
rev. 3.0, 09/04, page 930 of 1086 table 23.25 ac characteristics in auto-program mode condition: v cc = 3.3 v 0.3 v, v ss = 0 v, t a = 25 c 5 c code symbol min max unit note command write cycle t nxtc 20 s ce hold time t ceh 0ns ce setup time t ces 0ns data hold time t dh 50 ns data setup time t ds 50 ns programming pulse width t wep 70 ns status polling start time t wsts 1ms status polling access time t spa 150 ns address setup time t as 0ns address hold time t ah 60 ns memory programming time t write 1 3000 ms programming setup time t pns 100 ns programming end setup time t pnh 100 ns we rise time t r 30 ns we fall time t f 30 ns address stable fwe a19-a0 i/o5-i/o0 i/o6 i/o7 t as t ah t dh t ds tf tr t wep t wsts t write t spa t pns t pnh t nxtc t nxtc t ceh t ces programming end identification signal data transfer 1 byte to 128 bytes programming normal end confirmation signal h'40 or h'45 1st-byte din 128th-byte din h'00 figure 23.36 timing in auto-program mode
rev. 3.0, 09/04, page 931 of 1086 table 23.26 ac characteristics in auto-erase mode condition: v cc = 3.3 v 0.3 v, v ss = 0 v, t a = 25 c 5 c code symbol min max unit note command write cycle t nxtc 20 s ce hold time t ceh 0ns ce setup time t ces 0ns data hold time t dh 50 ns data setup time t ds 50 ns programming pulse width t wep 70 ns status polling start time t ests 1ms status polling access time t spa 150 ns memory erase time t erase 100 40000 ms erase setup time t ens 100 ns erase end setup time t enh 100 ns we rise time t r 30 ns we fall time t f 30 ns fwe a19-a0 i/o5-i/o0 i/o6 i/o7 t ests t erase t spa t dh t ds tf tr t wep t ens t e nh t nxtc t nxtc t ceh t ces erase end identification signal erase normal end confirmation signal h'20 or h'25 h'20 or h'25 h'00 figure 23.37 timing in auto-erase mode
rev. 3.0, 09/04, page 932 of 1086 table 23.27 ac characteristics status read mode condition: v cc = 3.3 v 0.3 v, v ss = 0 v, t a = 25 c 5 c code symbol min max unit note command write cycle t nxtc 20 s ce hold time t ceh 0ns ce setup time t ces 0ns data hold time t dh 50 ns data setup time t ds 50 ns programming pulse width t wep 70 ns oe output delay time t oe 150 ns disable delay time t df 100 ns ce output delay time t ce 150 ns we rise time t r 30 ns we fall time t f 30 ns a19-a0 i/o7-i/o0 t dh t df t ds tf tr t wep t nxtc t nxtc tf tr t wep t ds t dh t nxtc t ceh t ceh t oe t ces t ces t ce h'71 h'71 note: i/o3 and i/o2 are undefined. figure 22.38 timing in status read mode
rev. 3.0, 09/04, page 933 of 1086 table 23.28 stipulated transition times to command wait state condition: v cc = 3.3 v 0.3 v, v ss = 0 v, t a = 25 c 5 c code symbol min max unit note standby release (oscillation stabilization time) t osc1 30 ms programmer mode setup time t bmv 10 ms v cc hold time t dwn 0ms v cc fwe memory read mode command wait state command wait state normal/abnormal end identification auto-program mode auto-erase mode t osc1 t bmv t dwn note: set the fwe input pin to low level, except in the auto-program and auto-erase modes. figure 23.39 oscillation stabilization time, programmer mode setup time, and power- down sequence 23.10.3 storable area for procedure program and programming data in the descriptions in the previous section, storable areas for the programming/erasing procedure programs and program data are assumed to be in on-chip ram. however, the procedure programs and data can be stored in and executed from other areas (e.g. external address space) as long as the following conditions are satisfied. (1) the on-chip programming/erasing program is downloaded from the address set by ftdar in on-chip ram, therefore, this area is not available for use. (2) the on-chip programming/erasing program will use 128 bytes or more as a stack. make sure this area is reserved. (3) since download by setting the sco bit to 1 will cause the mats to be switched, it should be executed in on-chip ram. (4) the flash memory is accessible until the start of programming or erasing, that is, until the result of downloading has been judged. when in a mode in which the external address space is not accessible, such as single-chip mode, the required procedure programs, interrupt vector
rev. 3.0, 09/04, page 934 of 1086 table, interrupt processing routine, and user branch program should be transferred to on-chip ram before programming/erasing of the flash memory starts. (5) the flash memory is not accessible during programming/erasing operations. therefore, the programming/erasing program must be downloaded to on-chip ram in advance. areas for executing each procedure program for initiating programming/erasing, the user program at the user branch destination for programming/erasing, the interrupt vector table, and the interrupt processing routine must be located in on-chip memory other than flash memory or the external address space. (6) after programming/erasing, access to flash memory is inhibited until fkey is cleared. a reset state ( res = 0) for more than at least 100 s must be taken when the lsi mode is changed to reset on completion of a programming/erasing operation. transitions to the reset state or hardware standby mode during programming/erasing are inhibited. when the reset signal is accidentally input to the lsi, a longer period in the reset state than usual (100 s) is needed before the reset signal is released. (7) switching of the mats by fmats is needed for programming/erasing of the user mat in user boot mode. the program which switches the mats should be executed from the on-chip ram. for details, see section 23.8.1, switching between user mat and user boot mat. please make sure you know which mat is selected when switching the mats. (8) when the program data storage area indicated by the fmpdr parameter in the programming processing is within the flash memory area, an error will occur. therefore, temporarily transfer the program data to on-chip ram to change the address set in fmpdr to an address other than flash memory. based on these conditions, tables 23.29 and 23.30 show the areas in which the program data can be stored and executed according to the operation type and mode. table 22.29 executable mat initiated mode operation user program mode user boot mode * programming table 23.30 (1) table 23.30 (3) erasing table 23.30 (2) table 23.30 (4) note: * programming/erasing is possible to user mats.
rev. 3.0, 09/04, page 935 of 1086 table 23.30 (1) usable area for programming in user program mode storable /executable area selected mat item on- chip ram user mat external space (expanded mode with md0 = 0) user mat embedded program storage mat program data storage area o x * o?? selecting on-chip program to be downloaded ooo o writing h'a5 to key register o o o o writing 1 to sco in fccs (download) ox x o key register clearing o o o o judging download result o o o o download error processing o o o o setting initialization parameters o o o o initialization o x x o judging initialization result o o o o initialization error processing o o o o interrupt processing routine o x o o writing h'5a to key register o o o o setting programming parameters ox o o programming o x x o judging programming result o x o o programming error processing o x o o key register clearing o x o o note: * if the data has been transferred to on-chip ram in advance, this area can be used. pro- gram- ming proce- dure
rev. 3.0, 09/04, page 936 of 1086 table 23.30 (2) usable area for erasure in user program mode storable /executable area selected mat item on- chip ram user mat external space (expanded mode with md0 = 0) user mat embedded program storage mat selecting on-chip program to be downloaded ooo o writing h'a5 to key register o o o o writing 1 to sco in fccs (download) ox x o key register clearing o o o o judging download result o o o o download error processing o o o o setting initialization parameters o o o o initialization o x x o judging initialization result o o o o initialization error processing o o o o interrupt processing routine o x o o writing h'5a to key register o o o o setting erasure parameters o x o o erasure o x x o judging erasure result o x o o erasing error processing o x o o key register clearing o x o o eras- ing proce- dure
rev. 3.0, 09/04, page 937 of 1086 table 23.30 (3) usable area for programming in user boot mode storable/executable area selected mat item on- chip ram user mat external space (expanded mode with md0 = 0) user mat user boot mat embedded program storage area program data storage area ox * 1 o??? selecting on-chip program to be downloaded ooo o writing h'a5 to key register ooo o writing 1 to sco in fccs (download) ox x o key register clearing o o o o judging download result ooo o download error processing ooo o setting initialization parameters ooo o initialization o x x o judging initialization result ooo o initialization error processing ooo o interrupt processing routine ox o o switching mats by fmats ox x o writing h'5a to key register ox o o pro- gram- ming proce- dure
rev. 3.0, 09/04, page 938 of 1086 table 23.30 (3) usable area for programming in user boot mode (cont) storable/executable area selected mat item on- chip ram user mat external space (expanded mode with md0 = 0) user mat user boot mat embedded program storage area setting programming parameters ox o o programming o x x o judging programming result ox o o programming error processing ox * 2 oo key register clearing o x o o switching mats by fmats ox x o notes 1. if the data has been transferred to on-chip ram in advance, this area can be used. 2. if the mats have been switched by fmats in on-chip ram, this mat can be used. pro- gram- ming proce- dure
rev. 3.0, 09/04, page 939 of 1086 table 23.30 (4) usable area for erasure in user boot mode storable/executable area selected mat item on- chip ram user mat external space (expanded mode with md0 = 0) user mat user boot mat embedded program storage area selecting on-chip program to be downloaded ooo o writing h'a5 to key register ooo o writing 1 to sco in fccs (download) ox x o key register clearing o o o o judging download result ooo o download error processing ooo o setting initialization parameters ooo o initialization o x x o judging initialization result ooo o initialization error processing ooo o interrupt processing routine ox o o switching mats by fmats ox x o writing h'5a to key register ox o o setting erasure parameters ox o o eras- ing proce- dure
rev. 3.0, 09/04, page 940 of 1086 table 23.30 (4) usable area for erasure in user boot mode (cont) storable/executable area selected mat item on- chip ram user mat external space (expanded mode with md0 = 0) user mat user boot mat embedded program storage area erasure o x x o judging erasure result o x o o erasing error processing ox o o key register clearing o x o o switching mats by fmats ox x o note: if the mats have been switched by fmats in on-chip ram, this mat can be used. eras- ing proce- dure
rev. 3.0, 09/04, page 941 of 1086 section 24 ram 24.1 overview the sh7058 has 48 kbytes of on-chip ram. the on-chip ram is linked to the cpu, direct memory access controller (dmac), and advanced user debugger (aud) with a 32-bit data bus (figure 24.1). the cpu, dmac, and aud can access data in the on-chip ram in 8, 16, or 32 bit widths. on- chip ram data can always be accessed in one cycle for a read and two states for a write, making the ram ideal for use as a program area, stack area, or data area, which require high-speed access. the contents of the on-chip ram are held in both the sleep and software standby modes. when the rame bit (see below) is cleared to 0, the on-chip ram contents are also held in hardware standby mode. the on-chip ram is allocated to addresses h'ffff0000 to h'ffffbfff. h'ffff0000 h'ffff0004 h'ffff0001 h'ffff0005 h'ffff0002 h'ffff0006 h'ffff0003 h'ffff0007 h'ffffbffc h'ffffbffd h'ffffbffe h'ffffbfff on-chip ram internal data bus (32 bits) sh7058 8 bits 8 bits 8 bits 8 bits figure 24.1 block diagram of ram
rev. 3.0, 09/04, page 942 of 1086 24.2 operation the on-chip ram is controlled by means of the system control register (syscr). when the rame bit in syscr is set to 1, the on-chip ram is enabled. accesses to addresses h'ffff0000?h'ffffbfff are then directed to the on-chip ram. when the rame bit in syscr is cleared to 0, the on-chip ram is not accessed. a read will return an undefined value, and a write is invalid. if a transition is made to hardware standby mode after the rame bit in syscr is cleared to 0, the contents of the on-chip ram are held. for details of syscr, see section 25.2.2, system control register1 (syscr1), in section 25, power-down state.
rev. 3.0, 09/04, page 943 of 1086 section 25 power-down state 25.1 overview three modes are provided as power-save modes, namely, the hardware standby, software standby and sleep modes. also, a module standby function is available to stop some modules. these standby modes can be selected depending on applications to reduce the power consumption of the sh7058. 25.1.1 power-down states the power-down state is effected by the following modes: 1. hardware standby mode a transition to hardware standby mode is made according to the input level of the res and hstby pins. in hardware standby mode, all sh7058 functions are halted. this state is exited by means of a power-on reset. 2. software standby mode a transition to software standby mode is made by means of software (a cpu instruction). in software standby mode, all sh7058 functions are halted. this state is exited by means of a power-on reset or an nmi interrupt. 3. sleep mode a transition to sleep mode is made by means of a cpu instruction. in software standby mode, basically only the cpu is halted, and all on-chip peripheral modules operate. this state is exited by means of a power-on reset, a manual reset, interrupt, or dma address error. 4. module standby mode operation of the on-chip peripheral modules* which can be placed in a standby mode can be stopped by stopping the clock supply. clock supply to the individual modules can be controlled by setting bits in system control register 2 (syscr2). note: * aud, h-udi, fpu, and ubc
rev. 3.0, 09/04, page 944 of 1086 table 25.1 shows the transition conditions for entering the modes from the program execution state, as well as the cpu and peripheral module status in each mode and the procedures for canceling each mode. table 25.1 power-down state conditions state mode entering procedure clock cpu cpu registers on-chip peripheral modules ram pins canceling procedure hardware standby low-level input at hstby pin halted halted undefined halted held * 2 initialized high-level input at hstby pin, executing power-on reset software standby execute sleep instruction with ssby bit set to 1 in sbycr halted halted held halted * 1 held held or high impe- dance * 3 ? nmi interrupt ? power-on reset sleep execute sleep instruction with ssby bit cleared to 0 in sbycr runs halted held runs held held ? interrupt ? dma address error ? power-on reset ? manual reset notes: sbycr: standby control register ssby: software standby bit 1. some bits within on-chip peripheral module registers are initialized in software standby mode, and some are not. refer to the register descriptions for each peripheral module. 2. clear the rame bit in syscr1 to 0 in advance when changing the state from the program execution state in hardware standby mode. 3. the state of the i/o ports in standby mode is set by the port high impedance bit (hiz) in sbycr. see section 25.2.1, standby control register (sbycr).
rev. 3.0, 09/04, page 945 of 1086 25.1.2 pin configuration pins related to power-down modes are shown in table 25.2. table 25.2 pin configuration pin name abbreviation i/o function hardware standby input pin hstby input input level determines transition to hardware standby mode power-on reset input pin res input power-on reset signal input pin 25.1.3 related registers table 25.3 shows the registers used for power-down state control. table 25.3 related registers initial address a ccess name abbreviation r/w value write read size standby control register sbycr * 1 r/w h'1f h'ffffec14 8 system control register 1 syscr1 * 1 r/w h'01 h'fffff708 8 system control register 2 syscr2 * 1 r/w h'01 h'fffff70a * 2 h'fffff70b * 3 8, 16 notes: 1. register access with an internal clock multiplication ratio of 4 requires four internal clock ( ) cycles for sbycr, and four or five internal clock ( ) cycles for syscr1 and syscr2. 2. write data in words. data cannot be written in bytes or longwords. 3. read data in bytes. values cannot be read correctly if data is read in words or longwords. 25.2 register descriptions 25.2.1 standby control register (sbycr) the standby control register (sbycr) is an 8-bit readable/writable register that sets the transition to standby mode, and the port state in standby mode. sbycr is initialized to h'1f by a power-on reset.
rev. 3.0, 09/04, page 946 of 1086 bit: 7 6 5 4 3 2 1 0 ssby hiz ? ? ? ? ? ? initial value: 0 0 0 1 1 1 1 1 r/w: r/w r/w r r r r r r ? bit 7?software standby (ssby): specifies transition to software standby mode. the ssby bit cannot be set to 1 while the watchdog timer is running (when the timer enable bit (tme) in the wdt timer control/status register (tcsr) is set to 1). to enter software standby mode, always halt the wdt by clearing the tme bit to 0, then set the ssby bit. bit 7: ssby description 0 executing sleep instruction puts the sh7058 into sleep mode (initial value ) 1 executing sleep instruction puts the sh7058 into standby mode ? bit 6?port high impedance (hiz): in software standby mode, this bit selects whether to set i/o port pins to high impedance or hold the pin state. the hiz bit cannot be set to 1 when the tme bit in the wdt timer control/status register (tcsr) is set to 1. when making the i/o port pin state high impedance, always clear the tme bit to 0 before setting the hiz bit. bit 6: hiz description 0 pin states held in software standby mode (initial value ) 1 pins go to high impedance in software standby mode ? bit 5?reserved: this bit is always read as 0. the write value should always be 0. ? bits 4 to 0?reserved: these bits are always read as 1. the write value should always be 1. 25.2.2 system control register 1 (syscr1) bit:7 654 3 2 1 0 oscstop inosce ? ? ? ? audsrst rame initial value: ? 0 0 0 0 0 0 1 r/w: r r/w r r r r r/w r/w system control register 1 (syscr1) is an 8-bit readable/writable register that performs aud software reset control and enables or disables access to the on-chip ram. syscr1 is initialized to h'01 by a power-on reset (at the rising edge). ? bits 7 and 6: refer to section 5.4, precautions for performing crystal resonator stoppage detection function.
rev. 3.0, 09/04, page 947 of 1086 ? bits 5 to 2?reserved: these bits are always read as 0. the write value should always be 0. ? bit1? aud software reset (audsrst): this bit controls aud reset using software. setting audsrst bit to 1 places the aud module in the power-on reset state. bit 1: audsrst description 0 aud reset state cleared 1 aud reset state entered (initial value ) ? bit 0?rame enable (rame): selects enabling or disabling of the on-chip ram. when rame is set to 1, on-chip ram is enabled. when rame is cleared to 0, on-chip ram cannot be accessed. in this case, a read or instruction fetch from on-chip ram will return an undefined value, and a write to on-chip ram will be ignored. the initial value of rame is 1. when on-chip ram is disabled by clearing rame to 0, do not place an instruction that attempts to access on-chip ram immediately after the syscr1 write instruction, as normal access cannot be guaranteed in this case. when on-chip ram is enabled by setting rame to 1, place an syscr1 read instruction immediately after the syscr1 write instruction. normal access cannot be guaranteed if an on- chip ram access instruction is placed immediately after the syscr1 write instruction. bit 0: rame description 0 on-chip ram disabled 1 on-chip ram enabled (initial value ) 25.2.3 system control register 2 (syscr2) bit: 7 6 5 4 3 2 1 0 cksel ? ? ? mstop3 mstop2 mstop1 mstop0 initial value: 0 0 0 0 0 0 0 1 r/w: r/w r r r r/w r/w r/w r/w system control register 2 (syscr2) is an 8-bit readable/writable register that controls the standby state of the aud, h-udi, fpu, and ubc on-chip modules. syscr2 is initialized to h'01 by a power-on reset. note: the method of writing to syscr2 is different from that of ordinary registers to prevent inadvertent rewriting. see section 25.2.4, notes on register access, for more information. ? bit 7?internal clock ( ) select (cksel): see section 5, clock pulse generator (cpg).
rev. 3.0, 09/04, page 948 of 1086 ? bits 6 to 4?reserved: these bits are always read as 0. the write value should always be 0. ? bit 3?module stop 3 (mstop3): specifies halting of the clock supply to the aud on-chip peripheral module. setting the mstop3 bit to 1 stops the clock supply to the aud. to cancel halting of the clock supply to the aud, first set the aud software reset bit (audsrst) in the system control register 1 (syscr1) to the aud reset state value. use of the aud will then be enabled by clearing the aud reset. bit 3: mstop3 description 0 aud operates (initial value ) 1 clock supply to aud stopped ? bit 2?module stop 2 (mstop2): specifies halting of the clock supply to the h-udi on-chip peripheral module. setting the mstop2 bit to 1 stops the clock supply to the h-udi. bit 2: mstop2 description 0 h-udi operates 1 clock supply to h-udi stopped (initial value ) ? bit 1?module stop 1 (mstop1): specifies halting of the clock supply to the fpu on-chip peripheral module. setting the mstop1 bit to 1 stops the clock supply to the fpu. the mstop1 bit cannot be cleared by writing 0 after it has been set to 1. in other words, once the mstop1 bit has been set to 1 and the clock supply to the fpu has been stopped, the clock supply to the fpu cannot be resumed by clearing the mstop1 bit to 0. an sh7058 power-on reset is necessary to restart the fpu clock supply after it has been stopped. bit 1: mstop1 description 0 fpu operates (initial value ) 1 clock supply to fpu stopped ? bit 0?module stop 0 (mstop0): specifies halting of the clock supply to the ubc on-chip peripheral module. clearing the mstop0 bit to 0 starts the clock supply to the ubc. stopping clock supply to the ubc will reset the internal state of the ubc including its registers. bit 0: mstop0 description 0 ubc operates 1 clock supply to ubc stopped (initial value )
rev. 3.0, 09/04, page 949 of 1086 25.2.4 notes on register access the method of writing to system control register 2 (syscr2) is different from that of ordinary registers to prevent inadvertent rewriting. be certain to use a word transfer instruction when writing data to syscr2. data cannot be written by a byte transfer instruction. as shown in figure 25.1, set the upper byte to h'3c and transfer data using the lower byte as write data. data can be read by the same method as for ordinary registers. syscr2 is allocated to address h'fffff70a. always use a byte transfer instruction to read data. 15 8 7 0 h'3c write data address: when writing to syscr2 h'fffff70a figure 25.1 writing to syscr2 25.3 hardware standby mode 25.3.1 transition to hardware standby mode the chip enters hardware standby mode when the hstby and res pins go low. the mode pin should be set according to the pin settings described in section 4, operating modes. if other settings are applied to the mode pin, operation cannot be guaranteed. hardware standby mode reduces power consumption drastically by halting all sh7058 functions. as the transition to hardware standby mode is made by means of external pin input, the transition is made asynchronously, regardless of the current state of the sh7058, and therefore the chip state prior to the transition is not preserved. however, on-chip ram data is retained as long as the specified voltage is supplied. to retain on-chip ram data, clear the ram enable bit (rame) to 0 in the system control register 1 (syscr1) before driving the hstby pin low. 25.3.2 canceling hardware standby mode hardware standby mode is canceled by means of the hstby pin and res pin. when hstby is driven high while res is low, the clock oscillator starts running. the res pin should be held low long enough for clock oscillation to stabilize. when res is driven high, power-on reset exception processing is started and a transition is made to the program execution state.
rev. 3.0, 09/04, page 950 of 1086 25.3.3 hardware standby mode timing figure 25.2 shows sample pin timings for hardware standby mode. a transition to hardware standby mode is made by driving the hstby pin low after driving the res pin low. hardware standby mode is canceled by driving hstby high, waiting for clock oscillation to stabilize, then switching res from low to high. oscillator pulse width t resw oscillation settling time + pulse width reset exception processing figure 25.2 hardware standby mode timing 25.4 software standby mode 25.4.1 transition to software standby mode to enter software standby mode, set the software standby bit (ssby) to 1 in sbycr, then execute the sleep instruction. the sh7058 switches from the program execution state to software standby mode. in software standby mode, power consumption is greatly reduced by halting not only the cpu, but the clock and on-chip peripheral modules as well. cpu register contents and on-chip ram data are held as long as the prescribed voltages are applied (when the rame bit in syscr1 is 0). the register contents of some on-chip peripheral modules are initialized, but some are not. the i/o port state can be selected as held or high impedance by the port high impedance bit (hiz) in sbycr. 25.4.2 canceling software standby mode software standby mode is canceled by an nmi interrupt or a power-on reset. cancellation by nmi: clock oscillation starts when a rising edge or falling edge (selected by the nmi edge select bit (nmie) in the interrupt control register (icr) of the intc) is detected in the
rev. 3.0, 09/04, page 951 of 1086 nmi signal. this clock is supplied only to the oscillation settling counter which counts the oscillation stablizing time. counting the oscillation settling time by the oscillation settling counter is used to indicate that the clock has stabilized, so the clock is supplied to the entire chip, software standby mode is canceled, and nmi exception processing begins. the oscillation settling counter overflows when it counts 2 14 =16384 with the input clock frequency. since the frequency of this counting clock is unstable until the pll multiplication curcuit is locked in, the absolute time is not fixed, and the ck pin signal output is in the high level for the meantime. when canceling standby mode with an nmi pin set for falling edge, be sure that the nmi pin level upon entering software standby (when the clock is halted) is high, and that the nmi pin level upon returning from software standby (when the clock starts after oscillation stabilization) is low. when canceling software standby mode with an nmi pin set for rising edge, be sure that the nmi pin level upon entering software standby (when the clock is halted) is low, and that the nmi pin level upon returning from software standby (when the clock starts after oscillation stabilization) is high. cancellation by power-on reset: a power-on reset of the sh7058 caused by driving the res pin low cancels software standby mode.
rev. 3.0, 09/04, page 952 of 1086 25.4.3 software standby mode application example this example describes a transition to software standby mode on the falling edge of the nmi signal, and cancellation on the rising edge of the nmi signal. the timing is shown in figure 25.3. when the nmi pin is changed from high to low level while the nmi edge select bit (nmie) in icr is set to 0 (falling edge detection), the nmi interrupt is accepted. when the nmie bit is set to 1 (rising edge detection) by the nmi exception service routine, the software standby bit (ssby) in sbycr is set to 1, and a sleep instruction is executed, software standby mode is entered. thereafter, software standby mode is canceled when the nmi pin is changed from low to high level. oscillator ck nmi pin nmie bit ssby bit sh7058 state oscillation settling time program execution exception service routine software standby mode nmi exception processing nmi exception processing figure 25.3 software standby mode nmi timing (application example)
rev. 3.0, 09/04, page 953 of 1086 25.5 sleep mode 25.5.1 transition to sleep mode executing the sleep instruction after the software standby bit (ssby) in sbycr has been cleared to 0 causes a transition from the program execution state to sleep mode. although the cpu halts immediately after executing the sleep instruction, the contents of its internal registers remain unchanged. the on-chip peripheral modules continue to run during sleep mode. 25.5.2 canceling sleep mode cancellation by interrupt: when an interrupt occurs, sleep mode is canceled and interrupt exception processing is executed. the sleep mode is not canceled if the interrupt cannot be accepted because its priority level is equal to or less than the mask level set in the cpu?s status register (sr) or if an interrupt by an on-chip peripheral module is disabled by the peripheral module. cancellation by dma address error: if a dma address error occurs, sleep mode is canceled and dma address error exception processing is executed. cancellation by manual reset: when an internal manual reset is triggered by the wdt and the cpu acquires the bus during the internal manual reset period, the state of the sh7058 changes to the manual reset state and sleep mode will be released. cancellation by power-on reset: a power-on reset of the sh7058 resulting from driving the res pin low, or caused by the wdt, cancels sleep mode.
rev. 3.0, 09/04, page 954 of 1086
rev. 3.0, 09/04, page 955 of 1086 section 26 reliability 26.1 reliability a failure rate curve represents an index of the reliability of a semiconductor device. the failure rate curve traces a bathtub shape over the course of time, as is shown in figure 26.1. the curve is divided into three periods according to the type of failure phenomena: an initial failure period, a random failure period (functional lifetime), and a wear-out failure period. initial failures, which occur during the initial failure period, are caused by contamination with foreign matter and localized chemical pollution; these can be eliminated by screening. wear-out failures in the final period are caused by the deterioration of materials that make up semiconductor devices during long periods of usage. random failures, which occur during the random failure period, are thought to occur in cases where a device with a minor failure is not removed by screening, and so is shipped, and then fails during the customer?s production process or in the field, and in cases where a failure which should normally not have occurred until the wear-out period occurs earlier because of variations in production. therefore, the reliability of semiconductor device is secured by appropriate screening to reduce the presence of initial failures and high reliability design to prevent the occurrence of wear-out failures. the reliability of a product is confirmed by producing a large quantity of prototypes for checking of the initial failure rate and executing accelerated life testing to identify the wear-out failure time in a realistic environment. time initial failure period functional lifetime wear-out failure period screening failure rate random failure period figure 26.1 failure rate curve (bathtub curve)
rev. 3.0, 09/04, page 956 of 1086 the reliability of products is estimated on the assumption that products developed for the automotive sector are used in a tougher environment than products for the consumer and industrial sectors. the representative failure phenomena of semiconductor devices, such as the dielectric breakdown of oxide films and electromigration in wiring, constitute wear-out failures. the stress factors in such failures are the voltage, current, and temperature applied to devices while they are in use. since the temperature range for the guaranteed operation of products for use in automobiles is conventionally ? 40 c to 85 c, their reliability in terms of the above failure phenomena has to be confirmed by accelerated life testing at all temperatures in this range. operation at temperatures in excess of 85 c leads to failure within a short time, since high temperatures induce failures in semiconductor devices. figure 26.2 shows the temperature dependence of semiconductor device lifetimes. the type of failure in this figure is a wear-out failure, i.e. the dielectric breakdown of oxide film. according to figure 26.2, the life at 125 c is 1/10 of life at 85 c, and operation at the higher temperature leads to a correspondingly higher probability of a failure in the field. therefore, the reliability of operation at a temperature in excess of 85 c is checked on the assumption that the period of operation at the upper-limit temperature of the range for guaranteed operation is 3000 hours. 100 10 1 0.1 0.01 125 85 50 temperature (?c) lifetime (log t) activation energy 0.6ev figure 26.2 temperature reliability of dielectric breakdown of oxide film
rev. 3.0, 09/04, page 957 of 1086 section 27 electrical characteristics 27.1 absolute maximum ratings table 27.1 shows the absolute maximum ratings. table 27.1 absolute maximum ratings item symbol rating unit remarks v cc and pllv cc pins v cc ?0.3 to +4.3 v the pllcap, extal, xtal, ck, and h-udi pins are concerned. (v cc and pllv cc are the same voltage) power supply voltage * pv cc 1 and pv cc 2 pins pv cc ?0.3 to + 6.5 v except for the pllcap, extal, xtal, ck, and h-udi pins and the analog input pin extal and h-udi pins vin ?0.3 to v cc + 0.3 v input voltage all pins other than analog input, extal, and h-udi pins vin ?0.3 to pv cc + 0.3 v refer to table 27.2, correspondence between power supply names and pins analog supply voltage av cc ?0.3 to +7.0 v analog reference voltage avref ?0.3 to av cc + 0.3 v analog input voltage v an ?0.3 to av cc + 0.3 v operating temperature (except writing or erasing flash memory) topr ?40 to + 125 c operating temperature (writing or erasing flash memory) tweopr ?40 to +85 c storage temperature tstg ?55 to +125 c
rev. 3.0, 09/04, page 958 of 1086 [operating precautions] operating the lsi in excess of the absolute maximum ratings may result in permanent damage. the two power supply voltages of pv cc of 5v and v cc of 3v may be used simultaneously with the lsi. be sure to use the lsi in compliance with the connection of power pins, combination conditions of applicable power supply voltages, voltage applicable to each pin, and conditions of output voltage, as specified in the manual. connecting a non-specified power supply or using the lsi at an incorrect voltage may result in permanent damage of the lsi or the system that contains the lsi. note: * do not apply any power supply voltage to the v cl pin. connect to gnd through an external capacitor (0.33 to 0.47 f).
rev. 3.0, 09/04, page 959 of 1086 27.2 dc characteristics table 27.2 shows the correspondence between power supply names and pins. table 27.4 shows dc characteristics. table 27.2 correspondence between power supply names and pins power supply pin user pin output circuit input pin no. (fp- 256h) power supply name dedicated pin function 1 function 2 function 3 function 4 power supply name voltage upper limit (v) notes 1pd8puls0 pv cc 2pv cc 2+0.3 2pd9puls1 pv cc 2pv cc 2+0.3 3 pd10 puls2 pv cc 2pv cc 2+0.3 4 pd11 puls3 pv cc 2pv cc 2+0.3 5 pd12 puls4 pv cc 2pv cc 2+0.3 6 pd13 puls6 htxd0 htxd1 pv cc 2pv cc 2+0.3 7 pe0 a0 pv cc 1pv cc 1+0.3 8 pe1 a1 pv cc 1pv cc 1+0.3 9 pe2 a2 pv cc 1pv cc 1+0.3 10 pe3 a3 pv cc 1pv cc 1+0.3 11 v cc 12 pe4 a4 pv cc 1pv cc 1+0.3 13 v ss 14 pe5 a5 pv cc 1pv cc 1+0.3 15 pe6 a6 pv cc 1pv cc 1+0.3 16 pe7 a7 pv cc 1pv cc 1+0.3 17 pe8 a8 pv cc 1pv cc 1+0.3 18 pe9 a9 pv cc 1pv cc 1+0.3 19 pe10 a10 pv cc 1pv cc 1+0.3 20 pv cc 1 21 pe11 a11 pv cc 1pv cc 1+0.3 22 v ss 23 pe12 a12 pv cc 1pv cc 1+0.3 24 pe13 a13 pv cc 1pv cc 1+0.3 25 pe14 a14 pv cc 1pv cc 1+0.3
rev. 3.0, 09/04, page 960 of 1086 table 27.2 correspondence between power supply names and pins (cont) power supply pin user pin output circuit input pin no. (fp- 256h) power supply name dedicated pin function 1 function 2 function 3 function 4 power supply name voltage upper limit (v) notes 26 pe15 a15 pv cc 1pv cc 1+0.3 27 pf0 a16 pv cc 1pv cc 1+0.3 28 pf1 a17 pv cc 1pv cc 1+0.3 29 pf2 a18 pv cc 1pv cc 1+0.3 30 v cl 31 pf3 a19 pv cc 1pv cc 1+0.3 32 v ss 33 pf4 a20 pv cc 1pv cc 1+0.3 34 pf5 a21 pod pv cc 1pv cc 1+0.3 35 pf6 wrl pv cc 1pv cc 1+0.3 36 pf7 wrh pv cc 1pv cc 1+0.3 37 pf8 wait pv cc 1pv cc 1+0.3 38 pf9 rd pv cc 1pv cc 1+0.3 39 pv cc 1 40 pf10 cs0 pv cc 1pv cc 1+0.3 41 v ss 42 pf11 cs1 pv cc 1pv cc 1+0.3 43 pf12 cs2 pv cc 1pv cc 1+0.3 44 pf13 cs3 pv cc 1pv cc 1+0.3 45 pf14 back pv cc 1pv cc 1+0.3 46 pf15 breq pv cc 1pv cc 1+0.3 47 v ss 48 ck v cc 49 v cc 50 md2 5.5+0.3 51 extal v cc +0.3 52 v cc 53 xtal v cc 54 v ss 55 md1 5.5+0.3
rev. 3.0, 09/04, page 961 of 1086 table 27.2 correspondence between power supply names and pins (cont) power supply pin user pin output circuit input pin no. (fp- 256h) power supply name dedicated pin function 1 function 2 function 3 function 4 power supply name voltage upper limit (v) notes 56 fwe 5.5+0.3 57 hstby 5.5+0.3 58 res 5.5+0.3 59 md0 5.5+0.3 60 pllv cc 61 pllcap 62 pllv ss 63 ph0 d0 pv cc 1pv cc 1+0.3 64 ph1 d1 pv cc 1pv cc 1+0.3 65 ph2 d2 pv cc 1pv cc 1+0.3 66 ph3 d3 pv cc 1pv cc 1+0.3 67 ph4 d4 pv cc 1pv cc 1+0.3 68 ph5 d5 pv cc 1pv cc 1+0.3 69 ph6 d6 pv cc 1pv cc 1+0.3 70 pv cc 1 71 ph7 d7 pv cc 1pv cc 1+0.3 72 v ss 73 ph8 d8 pv cc 1pv cc 1+0.3 74 ph9 d9 pv cc 1pv cc 1+0.3 75 v cc 76 ph10 d10 pv cc 1pv cc 1+0.3 77 v ss 78 ph11 d11 pv cc 1pv cc 1+0.3 79 ph12 d12 pv cc 1pv cc 1+0.3 80 ph13 d13 pv cc 1pv cc 1+0.3 81 ph14 d14 pv cc 1pv cc 1+0.3 82 ph15 d15 pv cc 1pv cc 1+0.3 83 pv cc 1 84 nmi 5.5+0.3 85 v ss
rev. 3.0, 09/04, page 962 of 1086 table 27.2 correspondence between power supply names and pins (cont) power supply pin user pin output circuit input pin no. (fp- 256h) power supply name dedicated pin function 1 function 2 function 3 function 4 power supply name voltage upper limit (v) notes 86 an0 av cc +0.3 87 an1 av cc +0.3 88 an2 av cc +0.3 89 an3 av cc +0.3 90 an4 av cc +0.3 91 an5 av cc +0.3 92 an6 av cc +0.3 93 an7 av cc +0.3 94 an8 av cc +0.3 95 an9 av cc +0.3 96 an10 av cc +0.3 97 an11 av cc +0.3 98 an12 av cc +0.3 99 av ss 100 avref 101 av cc 102 an13 av cc +0.3 103 an14 av cc +0.3 104 an15 av cc +0.3 105 an16 av cc +0.3 106 an17 av cc +0.3 107 an18 av cc +0.3 108 an19 av cc +0.3 109 an20 av cc +0.3 110 an21 av cc +0.3 111 an22 av cc +0.3 112 an23 av cc +0.3 113 an24 av cc +0.3 114 an25 av cc +0.3 115 an26 av cc +0.3
rev. 3.0, 09/04, page 963 of 1086 table 27.2 correspondence between power supply names and pins (cont) power supply pin user pin output circuit input pin no. (fp- 256h) power supply name dedicated pin function 1 function 2 function 3 function 4 power supply name voltage upper limit (v) notes 116 an27 av cc +0.3 117 an28 av cc +0.3 118 an29 av cc +0.3 119 av cc 120 avref 121 av ss 122 an30 av cc +0.3 123 an31 av cc +0.3 124 wdtovf pv cc 2 125 pa0 ti0a pv cc 2pv cc 2+0.3 schmitt- trigger input pin 126 v ss 127 pa1 ti0b pv cc 2pv cc 2+0.3 schmitt- trigger input pin 128 pv cc 2 129 pa2 ti0c pv cc 2pv cc 2+0.3 130 pa3 ti0d pv cc 2pv cc 2+0.3 131 pa4 tio3a pv cc 2pv cc 2+0.3 132 pa5 tio3b pv cc 2pv cc 2+0.3 133 pa6 tio3c pv cc 2pv cc 2+0.3 134 pa7 tio3d pv cc 2pv cc 2+0.3 135 pa8 tio4a pv cc 2pv cc 2+0.3 136 pa9 tio4b pv cc 2pv cc 2+0.3 137 pa10 tio4c pv cc 2pv cc 2+0.3 138 pa11 tio4d pv cc 2pv cc 2+0.3 schmitt- trigger input pin 139 v cc 140 pa12 tio5a pv cc 2pv cc 2+0.3 schmitt- trigger input pin
rev. 3.0, 09/04, page 964 of 1086 table 27.2 correspondence between power supply names and pins (cont) power supply pin user pin output circuit input pin no. (fp- 256h) power supply name dedicated pin function 1 function 2 function 3 function 4 power supply name voltage upper limit (v) notes 141 v ss 142 pa13 tio5b pv cc 2pv cc 2+0.3 schmitt- trigger input pin 143 pa14 txd0 pv cc 2pv cc 2+0.3 144 pa15 rxd0 pv cc 2pv cc 2+0.3 145 pb0 to6a pv cc 2pv cc 2+0.3 146 pb1 to6b pv cc 2pv cc 2+0.3 147 pb2 to6c pv cc 2pv cc 2+0.3 148 pv cc 2 149 pb3 to6d pv cc 2pv cc 2+0.3 150 v ss 151 pb4 to7a to8a pv cc 2pv cc 2+0.3 152 pb5 to7b to8b pv cc 2pv cc 2+0.3 153 pb6 to7c to8c pv cc 2pv cc 2+0.3 154 pb7 to7d to8d pv cc 2pv cc 2+0.3 155 pb8 txd3 to8e pv cc 2pv cc 2+0.3 156 pb9 rxd3 to8f pv cc 2pv cc 2+0.3 157 pb10 txd4 htxd0 to8g pv cc 2pv cc 2+0.3 158 pb11 rxd4 hrxd0 to8h pv cc 2pv cc 2+0.3 159 pb12 tclka ubctrg pv cc 2pv cc 2+0.3 160 pb13 sck0 pv cc 2pv cc 2+0.3 schmitt- trigger input pin 161 v cl 162 pb14 sck1 tclkb ti10 pv cc 2pv cc 2+0.3 schmitt- trigger input pin 163 v ss 164 pb15 puls5 sck2 pv cc 2pv cc 2+0.3 schmitt- trigger input pin 165 pc0 txd1 pv cc 2pv cc 2+0.3
rev. 3.0, 09/04, page 965 of 1086 table 27.2 correspondence between power supply names and pins (cont) power supply pin user pin output circuit input pin no. (fp- 256h) power supply name dedicated pin function 1 function 2 function 3 function 4 power supply name voltage upper limit (v) notes 166 pc1 rxd1 pv cc 2pv cc 2+0.3 167 pc2 txd2 pv cc 2pv cc 2+0.3 168 pc3 rxd2 pv cc 2pv cc 2+0.3 169 pc4 irq0 pv cc 2pv cc 2+0.3 schmitt- trigger input pin 170 pg0 puls7 hrxd0 hrxd1 pv cc 2pv cc 2+0.3 171 pg1 irq1 pv cc 2pv cc 2+0.3 schmitt- trigger input pin 172 pv cc 2 173 pg2 irq2 adend pv cc 2pv cc 2+0.3 schmitt- trigger input pin 174 v ss 175 pg3 irq3 adtrg0 pv cc 2pv cc 2+0.3 176 pj0 tio2a pv cc 2pv cc 2+0.3 177 pj1 tio2b pv cc 2pv cc 2+0.3 178 pj2 tio2c pv cc 2pv cc 2+0.3 179 pj3 tio2d pv cc 2pv cc 2+0.3 180 pj4 tio2e pv cc 2pv cc 2+0.3 181 pj5 tio2f pv cc 2pv cc 2+0.3 182 pj6 tio2g pv cc 2pv cc 2+0.3 183 pj7 tio2h pv cc 2pv cc 2+0.3 184 pj8 tio5c pv cc 2pv cc 2+0.3 schmitt- trigger input pin 185 v ss 186 pj9 tio5d pv cc 2pv cc 2+0.3 schmitt- trigger input pin 187 v cc 188 pj10 ti9a pv cc 2pv cc 2+0.3 189 pj11 ti9b pv cc 2pv cc 2+0.3 schmitt- trigger input pin
rev. 3.0, 09/04, page 966 of 1086 table 27.2 correspondence between power supply names and pins (cont) power supply pin user pin output circuit input pin no. (fp- 256h) power supply name dedicated pin function 1 function 2 function 3 function 4 power supply name voltage upper limit (v) notes 190 pj12 ti9c pv cc 2pv cc 2+0.3 191 pj13 ti9d pv cc 2pv cc 2+0.3 192 pj14 ti9e pv cc 2pv cc 2+0.3 193 pj15 ti9f pv cc 2pv cc 2+0.3 schmitt- trigger input pin 194 pv cc 2 195 pk0 to8a pv cc 2pv cc 2+0.3 196 v ss 197 pk1 to8b pv cc 2pv cc 2+0.3 198 pk2 to8c pv cc 2pv cc 2+0.3 199 pk3 to8d pv cc 2pv cc 2+0.3 200 pk4 to8e pv cc 2pv cc 2+0.3 201 pk5 to8f pv cc 2pv cc 2+0.3 202 pk6 to8g pv cc 2pv cc 2+0.3 203 v cc 204 pk7 to8h pv cc 2pv cc 2+0.3 205 v ss 206 pk8 to8i pv cc 2pv cc 2+0.3 207 pk9 to8j pv cc 2pv cc 2+0.3 208 pk10 to8k pv cc 2pv cc 2+0.3 209 pk11 to8l pv cc 2pv cc 2+0.3 210 pk12 to8m pv cc 2pv cc 2+0.3 211 pk13 to8n pv cc 2pv cc 2+0.3 212 pv cc 2 213 pk14 to8o pv cc 2pv cc 2+0.3 214 v ss 215 pk15 to8p pv cc 2pv cc 2+0.3 216 pl0 ti10 pv cc 2pv cc 2+0.3 schmitt- trigger input pin
rev. 3.0, 09/04, page 967 of 1086 table 27.2 correspondence between power supply names and pins (cont) power supply pin user pin output circuit input pin no. (fp- 256h) power supply name dedicated pin function 1 function 2 function 3 function 4 power supply name voltage upper limit (v) notes 217 pl1 tio11a irq6 pv cc 2pv cc 2+0.3 218 pl2 tio11b irq7 pv cc 2pv cc 2+0.3 219 pl3 tclkb pv cc 2pv cc 2+0.3 220 pl4 adtrg0 pv cc 2pv cc 2+0.3 221 pl5 adtrg1 pv cc 2pv cc 2+0.3 schmitt- trigger input pin 222 pl6 adend pv cc 2pv cc 2+0.3 223 pl7 sck2 pv cc 2pv cc 2+0.3 224 pl8 sck3 pv cc 2pv cc 2+0.3 schmitt- trigger input pin 225 v cl 226 pl9 sck4 irq5 pv cc 2pv cc 2+0.3 schmitt- trigger input pin 227 v ss 228 pl10 htxd0 htxd1 htxd0 and 1 pv cc 2pv cc 2+0.3 229 pl11 hrxd0 hrxd1 hrxd0, 1 pv cc 2pv cc 2+0.3 230 pl12 irq4 pv cc 2pv cc 2+0.3 schmitt- trigger input pin 231 pl13 irqout irqout pv cc 2pv cc 2+0.3 232 tms v cc +0.3 233 trst v cc +0.3 234 tdi v cc +0.3 235 tdo v cc 236 tck v cc +0.3 237 v cc 238 audrst pv cc 2+0.3 239 v ss 240 audmd pv cc 2+0.3 241 audata0 pv cc 2pv cc 2+0.3
rev. 3.0, 09/04, page 968 of 1086 table 27.2 correspondence between power supply names and pins (cont) power supply pin user pin output circuit input pin no. (fp- 256h) power supply name dedicated pin function 1 function 2 function 3 function 4 power supply name voltage upper limit (v) notes 242 audata1 pv cc 2pv cc 2+0.3 243 audata2 pv cc 2pv cc 2+0.3 244 audata3 pv cc 2pv cc 2+0.3 245 audck pv cc 2pv cc 2+0.3 246 audsync pv cc 2pv cc 2+0.3 247 pv cc 2 248 pd0 tio1a pv cc 2pv cc 2+0.3 schmitt- trigger input pin 249 v ss 250 pd1 tio1b pv cc 2pv cc 2+0.3 251 pd2 tio1c pv cc 2pv cc 2+0.3 252 pd3 tio1d pv cc 2pv cc 2+0.3 253 pd4 tio1e pv cc 2pv cc 2+0.3 254 pd5 tio1f pv cc 2pv cc 2+0.3 255 pd6 tio1g pv cc 2pv cc 2+0.3 256 pd7 tio1h pv cc 2pv cc 2+0.3 schmitt- trigger input pin
rev. 3.0, 09/04, page 969 of 1086 [usage notes] set power supply voltages during lsi operation as shown below. v cc = pllv cc = 3.3 v 0.3 v, pv cc 1 = 5.0 v 0.5 v/3.3 v 0.3 v, pv cc 2 = 5.0 v 0.5 v, av cc = 5.0 v 0.5 v, av ref = 4.5 v to av cc , v ss = pllv ss = av ss = 0 v when pv cc 1 = 3.3 v 0.3 v, v cc = pv cc 1 the pv cc 1 power supply voltage depends on the operating mode as shown below. operation cannot be guaranteed with other pv cc 1 power supply voltages. table 27.3 pv cc 1 voltage in each operating mode pin setting operating mode no few md2 md1 md0 mode name pv cc 1 voltage mode 0 0100 mode 1 0101 mode 2 0110 mcu expanded mode 3.3 v 0.3 v mode 3 0111mcu single-chip mode5.0 v 0.5 v mode 4 1100 3.3 v 0.3 v mode 5 1101 boot mode 5.0 v 0.5 v mode 6 1110 3.3 v 0.3 v mode 7 1111 user program mode 5.0 v 0.5 v mode 8 1000 3.3 v 0.3 v mode 9 1001 user boot mode 5.0 v 0.5 v
rev. 3.0, 09/04, page 970 of 1086 table 27.4 dc characteristics conditions: v cc = pllv cc = 3.3 v 0.3 v, pv cc 1 = 5.0 v 0.5 v/3.3 v 0.3 v, pv cc 2 = 5.0 v 0.5 v, av cc = 5.0 v 0.5 v, av ref = 4.5 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?40 c to 125 c. when pv cc 1 = 3.3 v 0.3 v, v cc = pv cc 1. when writing or erasing flash memory, t a = ?40 c to 85 c. item symbol min typ max unit measurement conditions v cc ? 0.4 ? 5.8 2.4v v cc < 2.7v res , nmi, fwe, md2?0, hstby v cc ? 0.5 5.8 v 2.7v v cc < 3.6v extal v cc 0.7 ?v cc + 0.3 v d15?d0, wait , breq (when in mcu expanded mode) 2.2 ? pv cc 1 + 0.3 vpv cc 1 = 3.3 v 0.3 v pe15?pe0, pf15? pf0, ph15?ph0 (when in mcu expanded mode) 2.2 ? pv cc 1 + 0.3 vpv cc 1 = 3.3 v 0.3 v trst pv cc ? 0.5 ?v cc + 0.3 v tms, tdi, tck 2.2 ? v cc + 0.3 v audrst , audmd pv cc ? 0.5 ? pv cc 2 + 0.3 v pg0, pl11 pv cc 2 0.7 pv cc 2 + 0.3 v input high- level voltage (except schmitt trigger input voltage) other input pins v ih 2.2 ? pvcc + 0.3 v ?0.3 ? 0.4 2.4v v cc < 2.7v res , nmi, fwe, md2?0, hstby , trst , audrst , audmd ?0.3 ? 0.5 v 2.7v v cc < 3.6v pg0, pl11 ?0.3 ? pv cc 2 0.3 v input low- level voltage (except schmitt trigger input voltage) other input pins v il ?0.3 ? 0.8 v
rev. 3.0, 09/04, page 971 of 1086 table 27.4 dc characteristics (cont) conditions: v cc = pllv cc = 3.3 v 0.3 v, pv cc 1 = 5.0 v 0.5 v/3.3 v 0.3 v, pv cc 2 = 5.0 v 0.5 v, av cc = 5.0 v 0.5 v, av ref = 4.5 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?40 c to 125 c. when pv cc 1 = 3.3 v 0.3 v, v cc = pv cc 1. when writing or erasing flash memory, t a = ?40 c to 85 c. item symbol min typ max unit measurement conditions (v ih ) v t + 4.0 ? (pv cc 2 + 0.3) v (v il ) v t ? (?0.3) ? 1.0 v schmitt trigger input voltage ti0a?ti0d, tio1a?tio1h, tio2a?tio2h, tio3a?tio3d, tio4a?tio4d, tio5a?tio5d, ti9a?ti9f, ti10, tio11a?tio11b, tclka, tclkb, adtrg0 , adtrg1 , sck0?sck4, irq0 ? irq7 and when these pins are selected as i/o ports v t + ? v t ? 0.4 ? ? v refer to table 27.2, correspondence between power supply names and pins res , nmi, fwe, md2?0, hstby , ??3.0 * 1 6.0 * 2 avin = 0.3 v to 5.8 v extal (standby) ? ? 3.0 * 1 6.0 * 2 avin = 0.3 v to v cc ? 0.3 v tms, trst , tdi, tck (standby) ??3.0 * 1 6.0 * 2 avin = 0.3 v to v cc ? 0.3 v audmd, audck, audsync , audata3?0 (standby) ??3.0 * 1 6.0 * 2 avin = 0.3 v to pv cc 2 ? 0.3 v audrst (standby) ? ? 3.0 * 1 6.0 * 2 avin = 0.3 v to pv cc 2 ? 0.3 v input leak current a/d port | lin | ??0.1 * 1 0.2 * 2 avin = 0.3 v to av cc ? 0.3 v
rev. 3.0, 09/04, page 972 of 1086 table 27.4 dc characteristics (cont) conditions: v cc = pllv cc = 3.3 v 0.3 v, pv cc 1 = 5.0 v 0.5 v/3.3 v 0.3 v, pv cc 2 = 5.0 v 0.5 v, av cc = 5.0 v 0.5 v, av ref = 4.5 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?40 c to 125 c. when pv cc 1 = 3.3 v 0.3 v, v cc = pv cc 1. when writing or erasing flash memory, t a = ?40 c to 85 c. item symbol min typ max unit measurement conditions d15?d0, wait , breq (when in mcu expanded mode) ??3.0 * 1 6.0 * 2 avin = 0.3 v to pv cc 1 ? 0.3 v pv cc 1 = 3.3 v 0.3 v pe15?pe0, pf15? pf0, ph15?ph0 (when in mcu expanded mode) ??3.0 * 1 6.0 * 2 avin = 0.3 v to pv cc 1 ? 0.3 v pv cc 1 = 3.3 v 0.3 v input leak current other input pins | lin | ??3.0 * 1 6.0 * 2 avin = 0.3 v to pv cc 2 ? 0.3 v tms, trst , tdi, tck (pull-up characteristic) ? ? 350 avin = 0 v input pull-up mos current audmd, audck, audsync , audata3-0 (pull-up characteristic) ?ipu ? ? 800 avin = 0 v input pull- down mos current audrst (pull-down characteristic) ipd ? ? 800 avin = pv cc 2 three-state leak current (while off) a21?a0, d15?d0, cs3 ? cs0 , wrh , wrl , rd , back (when in mcu expanded mode) l its l ? ? 3.0 * 1 6.0 * 2 avin = 0.3 v to pv cc 1 ? 0.3 v pv cc 1 = 3.3 v 0.3 v a21?a0, d15?d0, cs3 ? cs0 , wrh , wrl , rd , back (when in mcu expanded mode) pvcc1? 0.5 ?? v i oh = 200 a pv cc 1 = 3.3 v 0.3 v pe15?pe0, pf15? pf0, ph15?ph0 (when in mcu expanded mode) pvcc1? 0.5 ?? v i oh = 200 a pv cc 1 = 3.3 v 0.3 v output high- level voltage ck, tdo v oh v cc ? 0.5 ?? v i oh = 200 a
rev. 3.0, 09/04, page 973 of 1086 table 27.4 dc characteristics (cont) conditions: v cc = pllv cc = 3.3 v 0.3 v, pv cc 1 = 5.0 v 0.5 v/3.3 v 0.3 v, pv cc 2 = 5.0 v 0.5 v, av cc = 5.0 v 0.5 v, av ref = 4.5 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?40 c to 125 c. when pv cc 1 = 3.3 v 0.3 v, v cc = pv cc 1. when writing or erasing flash memory, t a = ?40 c to 85 c. item symbol min typ max unit measurement conditions pv cc ? 0.5 ?? v i oh = 200 a output high- level voltage other output pins v oh pv cc ? 1.0 ?? v i oh = 1 ma a21?a0, d15?d0, cs3 ? cs0 , wrh , wrl , rd , back (when in mcu expanded mode) ??0.4vi ol = 1.6 ma pv cc 1 = 3.3 v 0.3 v pe15?pe0, pf15? pf0, ph15?ph0 (when in mcu expanded mode) ??0.4vi ol = 1.6 ma pv cc 1 = 3.3 v 0.3 v ??0.4vi ol = 1.6 ma output low- level voltage other output pins (except xtal) v ol ??1.2vi ol = 6 ma res ? ? 60 pf nmi ? ? 30 pf input capacitance all other input pins cin ? ? 20 pf vin = 0 v f = 1 mhz t a = 25 c normal operation ? 100 150 ma sleep ? 80 130 ma f = 80 mhz ? ? 300 at a 50 c ? ? 750 a50 c < ta 105 c standby (2.7 v vcc 3.6 v) ? ? 1000 a 105 c < ta 125 c ? ? 600 at a 50 c ? ? 1000 a50 c < ta 105 c ram standby (2.4 v vcc 2.7 v) ? ? 1000 a 105 c < ta 125 c current consumption write operation i cc ? 80 130 ma v cc = 3.3 v f = 40 mhz
rev. 3.0, 09/04, page 974 of 1086 table 27.4 dc characteristics (cont) conditions: v cc = pllv cc = 3.3 v 0.3 v, pv cc 1 = 5.0 v 0.5 v/3.3 v 0.3 v, pv cc 2 = 5.0 v 0.5 v, av cc = 5.0 v 0.5 v, av ref = 4.5 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?40 c to 125 c. when pv cc 1 = 3.3 v 0.3 v, v cc = pv cc 1. when writing or erasing flash memory, t a = ?40 c to 85 c. item symbol min typ max unit measurement conditions during a/d conversion ?1.25 ma analog supply current awaiting a/d conversion, standby al cc ?1.030 a during a/d conversions, awaiting a/d conversion ?1.15 ma reference power supply current standby alref ?1.130 a av ref = 5.0 v ram standby voltage v ram 2.4 ? ? v v cc notes: 1. ta 105 c 2. ta > 105 c [operating precautions] 1. when the a/d converter is not used (including during standby), do not leave the av cc , av ref , and av ss pins open. 2. the current consumption is measured when v ih min = v cc ? 0.5 v/pv cc ? 0.5 v, v il = 0.5 v, with all output pins unloaded. 3. the guaranteed operating range of power supply pv cc 1 in the mcu expanded modes is only pv cc 1 = 3.3 v 0.3 v. do not use a voltage outside this range. 4. the guaranteed operating range of power supply pv cc 1 in mcu single-chip mode is only pv cc 1 = 5.0 v 0.5 v. do not use a voltage outside this range.
rev. 3.0, 09/04, page 975 of 1086 table 27.5 permitted output current values conditions: v cc = pllv cc = 3.3 v 0.3 v, pv cc 1 = 5.0 v 0.5 v/3.3 v 0.3 v, pv cc 2 = 5.0 v 0.5 v, av cc = 5.0 v 0.5 v, av ref = 4.5v to av cc , v ss = pllv ss = av ss = 0 v, ta = ?40 c to 125 c. when pv cc 1 = 3.3 v 0.3 v, v cc = pv cc 1. when writing or erasing on-chip flash memory, t a = ?40 c to 85 c. item symbol min typ max unit output low-level permissible current (per pin) i ol ??6.0ma output low-level permissible current (total) i ol ??80ma output high-level permissible current (per pin) i oh ??2.0ma output high-level permissible current (total) i ol ??25ma [operating precautions] to assure lsi reliability, do not exceed the output values listed in this table. 27.3 ac characteristics 27.3.1 timing for swicthing the power supply on/off table 27.6 timing for swicthing the power supply on/off conditions: v cc = pllv cc = 3.3 v 0.3 v, pv cc 1 = 5.0 v 0.5 v/3.3 v 0.3 v, pv cc 2 = 5.0 v 0.5 v, av cc = 5.0 v 0.5 v, av ref = 4.5 v to av cc , v ss = pllv ss = av ss = 0 v, ta = ?40 c to 125 c. when pv cc 1 = 3.3 v 0.3 v, v cc = pv cc 1. when writing or erasing on-chip flash memory, t a = ?40 c to 85 c. item symbol min max unit figures time taken to switch v cc on t vccs 0?ms v cc hold-time when pv cc is swtched off t vcch 0?ms figure 27.1
rev. 3.0, 09/04, page 976 of 1086 t vcch t vccs v cc pllv cc pv cc 2 pv cc 1 pv cc min pv cc min v cc min v cc min figure 27.1 power-on/off timing 27.3.2 clock timing table 27.7 shows the clock timing. table 27.7 clock timing conditions: v cc = pllv cc = 3.3 v 0.3 v, pv cc 1 = 5.0 v 0.5 v/3.3 v 0.3 v, pv cc 2 = 5.0 v 0.5 v, av cc = 5.0 v 0.5 v, av ref = 4.5 v to av cc , v ss = pllv ss = av ss = 0 v, ta = ?40 c to 125 c. when pv cc 1 = 3.3 v 0.3 v, v cc = pv cc 1. when writing or erasing on-chip flash memory, t a = ?40 c to 85 c. item symbol min max unit figures clock frequency f op 10 20 mhz clock cycle time t cyc 50 100 ns clock low-level pulse width t cl 12 ? ns clock high-level pulse width t ch 12 ? ns clock rise time t cr ?10ns clock fall time t cf ?10ns figure 27.2 extal clock input frequency f ex 510mhz extal clock input cycle time t ex cyc 100 200 ns extal clock input low-level pulse width t exl 30 ? ns extal clock input low-level pulse width t exh 30 ? ns extal clock input rise time t exr ?8 ns extal clock input fall time t exf ?8 ns figure 27.3 reset oscillation settling time t osc1 30 ? ms standby return clock settling time t osc2 30 ? ms figure 27.4 the ck pin outputs the peripheral clock signal (p ).
rev. 3.0, 09/04, page 977 of 1086 [operating precautions] the extal, xtal, and ck pins constitute a circuit requiring a power supply voltage of v cc = 3.3 v 0.3 v. comply with the input and output voltages specified in the dc characteristics. t cyc t ch t cf t cr v oh ck v oh 1/2v cc 1/2v cc v oh v ol v ol t cl note: ck pin is v cc = 3.3 v 0.3 v power supply circuit. figure 27.2 peripheral clock timing t excyc t exh t exf t exr v ih extal v ih 1/2v cc 1/2v cc v ih v il v il t exl note: extal pin is v cc = 3.3 v 0.3 v power supply circuit. figure 27.3 extal clock input timing
rev. 3.0, 09/04, page 978 of 1086 ck v cc pv cc2 pv cc1 v cc min pv cc min t osc1 v ih t osc1 t osc2 figure 27.4 oscillation settling time 27.3.3 control signal timing table 27.8 shows control signal timing. table 27.8 control signal timing conditions: v cc = pllv cc = 3.3 v 0.3 v, pv cc 1 = 5.0 v 0.5 v/3.3 v 0.3 v, pv cc 2 = 5.0 v 0.5 v, av cc = 5.0 v 0.5 v, av ref = 4.5 v to av cc , v ss = pllv ss = av ss = 0 v, ta = ?40 c to 125 c. when pv cc 1 = 3.3 v 0.3 v, v cc = pv cc 1. when writing or erasing on-chip flash memory, t a = ?40 c to 85 c. item symbol min max unit figures res pulse width t resw 10 ? t cyc res setup time t ress 30 ? ns md2 to md0 setup time 2 * 1 t mds 10 ? t cyc figure 27.5 nmi setup time t nmis 30 ? ns irq7 ? irq0 setup time * 2 (edge detection) t irqes 30 ? ns irq7 ? irq0 setup time * 2 (level detection) t irqls 30 ? ns nmi hold time t nmih 30 ? ns irq7 ? irq0 hold time t irqeh 30 ? ns figure 27.6 irqout output delay time t irqod ? 100 ns figure 27.7 bus request setup time t brqs 30 ? ns bus acknowledge delay time 1 t backd1 ?30ns bus acknowledge delay time 2 t backd2 ?30ns bus three-state delay time t bzd ?30ns figure 27.8 * 3
rev. 3.0, 09/04, page 979 of 1086 [operating precautions] 1. mode setup time during power-on reset by the res pin depends on the combination of signals to be input to the fwe and md2 to md0 pins. if a low-level signal is input to the res pin while this lsi operates by inputting a mode specified in table 27.3 to the fwe and md2 to md0 pins, the mode setup time is defined by tmds2. if a signal other than the combination of signals specified in table 27.3 (undefined mode) is input to the fwe and md2 to md0 pins, the mode setup time is defined by tmsd1. see section 27.6.2, notes on mode pin input. 2. the res , nmi, and irq7 ? irq0 signals are asynchronous inputs, but when the setup times shown here are provided, the signals are considered to have been changed at clock fall. if the setup times are not provided, recognition is delayed until the next clock rise or fall. 3. the guaranteed operating range of power supply pv cc 1 in the mcu expanded modes is only pv cc 1 = 3.3 v 0.3 v. do not use a voltage outside this range. t ress t md0 note: pin is controlled by v il and v ih shown above. v ih = v cc ? 0.5 v v ih = v cc ? 0.5 v v ih = v cc ? 0.5 v v oh v il = 0.5 v v il = 0.5 v v il = 0.5 v t ress t resw ck md2-0 figure 27.5 reset input timing
rev. 3.0, 09/04, page 980 of 1086 v il = 0.5 v v il = 0.5 v t nmis t nmih v ih v ol v ol v il v il t irqes t irqeh t irqls ck nmi edge level note: nmi pin is controlled by v il and v ih shown above. v ih = v cc ? 0.5 v v ih = v cc ? 0.5 v figure 27.6 interrupt signal input timing t irqod v oh v ol t irqod ck v oh figure 27.7 interrupt signal output timing
rev. 3.0, 09/04, page 981 of 1086 t brqs t backd1 t brqs t bzd t bzd hi-z hi-z v ol v ol v ol v oh v oh v oh v oh v ih t backd2 ck (input) (output) , , , a21 ? a0, d15 ? d0 figure 27.8 bus right release timing
rev. 3.0, 09/04, page 982 of 1086 27.3.4 bus timing table 27.9 shows bus timing. table 27.9 bus timing conditions: v cc = pllv cc = 3.3 v 0.3 v, pv cc 1 = 3.3 v 0.3 v, pv cc 2 = 5.0 v 0.5 v, av cc = 5.0 v 0.5 v, av ref = 4.5 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?40 c to 125 c. when pv cc 1 = 3.3 v 0.3 v, v cc = pv cc 1. when writing or erasing on-chip flash memory, t a = ?40 c to 85 c. item symbol min max unit figures address delay time t ad ?35ns cs delay time 1 t csd1 ?30ns cs delay time 2 t csd2 ?30ns read strobe delay time 1 t rsd1 ?30ns read strobe delay time 2 t rsd2 ?30ns read data setup time t rds 15 ? ns read data hold time t rdh 0?ns write strobe delay time 1 t wsd1 ?30ns write strobe delay time 2 t wsd2 ?30ns write data delay time t wdd ?30ns write data hold time t wdh t cyc m?ns figures 27.9, 27.10 wait setup time t wts 15 ? ns wait hold time t wth 0?ns figure 27.11 read data access time t acc t cyc (n+1.5)-39 ? ns access time from read strobe t oe t cyc (n+1.0)-39 ? ns write address setup time t as 0?ns write address hold time t wr 5?ns figures 27.9, 27.10 n: number of waits m = 1: cs assertion extension cycle m = 0: normal cycle (cs assertion non-extension cycle) [operating precautions] the guaranteed operating range of power supply pv cc 1 in the mcu expanded modes is only pv cc 1 = 3.3 v 0.3 v. do not use a voltage outside this range.
rev. 3.0, 09/04, page 983 of 1086 t 1 t ad v oh v ol t 2 t csd1 t rsd1 t oe t rsd2 t rds t acc t as t rdh t wsd2 t wr t wsd1 t csd2 t wdh t wdd note: t rdh : specified from the negate timing of a21 ? a0, , or , whichever is first. ck a21 ? a0 (read) (write) d15 ? d0 (read) d15 ? d0 (write) figure 27.9 basic cycle (no waits)
rev. 3.0, 09/04, page 984 of 1086 t 1 t ad t w t 2 t csd1 v ol v oh t rsd1 t oe t rsd2 t rds t acc t as t rdh t wr t wsd1 t csd2 t wdh t wdd note: t rdh : specified from the negate timing of a21 ? a0, , or , whichever is first. ck a21 ? a0 (read) (write) d15 ? d0 (read) d15 ? d0 (write) t wsd2 figure 27.10 basic cycle (one software wait)
rev. 3.0, 09/04, page 985 of 1086 t wth t wth t wts t wts ck a21 ? a0 (read) d15 ? d0 (read) d15 ? d0 (write) (write) t 1 t w t w t wo t 2 note: t rdh : specified from the negate timing of a21 ? a0, , or , whichever is first. figure 27.11 basic cycle (two software waits + waits by wait wait wait wait signal)
rev. 3.0, 09/04, page 986 of 1086 27.3.5 advanced timer unit timing and advance pulse controller timing table 27.10 shows advanced timer unit timing and advanced pulse controller timing. table 27.10 advanced timer unit timing and advanced pulse controller timing conditions: v cc = pllv cc = 3.3 v 0.3 v, pv cc 1 = 5.0 v 0.5 v/3.3 v 0.3 v, pv cc 2 = 5.0 v 0.5 v, av cc = 5.0 v 0.5 v, av ref = 4.5 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?40 c to 125 c. when pv cc 1 = 3.3 v 0.3 v, v cc = pv cc 1. when writing or erasing on-chip flash memory, t a = ?40 c to 85 c. item symbol min max unit figures output compare output delay time t tocd ? 100 ns input capture input setup time t tics 24 ? ns puls output delay time t plsd ? 100 ns figure 27.12 timer clock input setup time t tcks 24 ? ns timer clock pulse width (single edge specified) t tckwh/l 1.5 ? t cyc timer clock pulse width (both edges specified) t tckwh/l 2.5 ? t cyc figure 27.13 t tocd v oh v ol v ol ck timer output input capture input puls output t tics t plsd figure 27.12 atu input/output timing and apc output timing
rev. 3.0, 09/04, page 987 of 1086 v ol v ol t tcks t tcks t tckwl t tckwh ck tclka, tclkb figure 27.13 atu clock input timing 27.3.6 i/o port timing table 27.11 shows i/o port timing. table 27.11 i/o port timing conditions: v cc = pllv cc = 3.3 v 0.3 v, pv cc 1 = 5.0 v 0.5 v/3.3 v 0.3 v, pv cc 2 = 5.0 v 0.5 v, av cc = 5.0 v 0.5 v, av ref = 4.5 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?40 c to 125 c. when pv cc 1 = 3.3 v 0.3 v, v cc = pv cc 1. when writing or erasing on-chip flash memory, t a = ?40 c to 85 c. item symbol min max unit figures port output data delay time t pwd ? 100 ns port input hold time t prh 30 ? ns port input setup time t prs 30 ? ns figure 27.14 [operating precautions] the guaranteed operating range of power supply pv cc 1 in mcu single-chip mode is only pv cc 1 = 5.0 v 0.5 v. do not use a voltage outside this range. t prs t prh t pwd ck port (read) port (write) figure 27.14 i/o port input/output timing
rev. 3.0, 09/04, page 988 of 1086 27.3.7 watchdog timer timing table 27.12 shows watchdog timer timing. table 27.12 watchdog timer timing conditions: v cc = pllv cc = 3.3 v 0.3 v, pv cc 1 = 5.0 v 0.5 v/3.3 v 0.3 v, pv cc 2 = 5.0 v 0.5 v, av cc = 5.0 v 0.5 v, av ref = 4.5 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?40 c to 125 c. when pv cc 1 = 3.3 v 0.3 v, v cc = pv cc 1. when writing or erasing on-chip flash memory, t a = ?40 c to 85 c. item symbol min max unit figures wdtovf delay time t wovd ? 100 ns figure 27.15 t wovd t wovd v oh v oh ck figure 27.15 watchdog timer timing
rev. 3.0, 09/04, page 989 of 1086 27.3.8 serial communication interface timing table 27.13 shows serial communication interface timing. table 27.13 serial communication interface timing conditions: v cc = pllv cc = 3.3 v 0.3 v, pv cc 1 = 5.0 v 0.5 v/3.3 v 0.3 v, pv cc 2 = 5.0 v 0.5 v, av cc = 5.0 v 0.5 v, av ref = 4.5 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?40 c to 125 c. when pv cc 1 = 3.3 v 0.3 v, v cc = pv cc 1. when writing or erasing on-chip flash memory, t a = ?40 c to 85 c. item symbol min max unit figures clock cycle t scyc 4?t cyc clock cycle (clock sync) t scyc 6?t cyc clock pulse width t sckw 0.4 0.6 t scyc input clock rise time t sckr ?1.5t cyc input clock fall time t sckf ?1.5t cyc figure 27.16 transmit data delay time t txd ? 100 ns transmit data setup time t rxs 100 ? ns transmit data hold time t rxh 100 ? ns figure 27.17 t sckw v ih v ih v ih v ih v il v il v il sck0 ? sck4 t sckr t sckf t scyc figure 27.16 sci input/output timing
rev. 3.0, 09/04, page 990 of 1086 t scyc sck0 sck4 (input/output) txd0 txd4 (transmit data) rxd0 rxd4 (receive data) sci input/output timing (synchronous mode) t txd t rxs t rxh v oh v oh ck txd0 txd4 (transmit data) rxd0 rxd4 (receive data) sci input/output timing (asynchronous mode) t txd t rxs t rxh figure 27.17 sci input/output timing
rev. 3.0, 09/04, page 991 of 1086 27.3.9 hcan timing table 27.14 shows hcan timing. table 27.14 hcan timing conditions: v cc = pllv cc = 3.3 v 0.3 v, pv cc 1 = 5.0 v 0.5 v/3.3 v 0.3 v, pv cc 2 = 5.0 v 0.5 v, av cc = 5.0 v 0.5 v, av ref = 4.5 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?40 c to 125 c. when pv cc 1 = 3.3 v 0.3 v, v cc = pv cc 1. when writing or erasing on-chip flash memory, t a = ?40 c to 85 c. item symbol min max unit figures transmit data delay time t htxd ? 100 ns transmit data setup time t hrxs 100 ? ns transmit data hold time t hrxh 100 ? ns figure 27.18 v oh v oh ck htxd0, htxd1 (transmit data) hrxd0, hrxd1 (receive data) t htxd t hrxs t hrxh figure 27.18 hcan input/output timing
rev. 3.0, 09/04, page 992 of 1086 27.3.10 a/d converter timing table 27.15 shows a/d converter timing. table 27.15 a/d converter timing conditions: v cc = pllv cc = 3.3 v 0.3 v, pv cc 1 = 5.0 v 0.5 v/3.3 v 0.3 v, pv cc 2 = 5.0 v 0.5 v, av cc = 5.0 v 0.5 v, av ref = 4.5 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?40 c to 125 c. when pv cc 1 = 3.3 v 0.3 v, v cc = pv cc 1. when writing or erasing on-chip flash memory, t a = ?40 c to 85 c. csk = 0: fop = t.b.d. csk = 1: fop = t.b.d. item symbol min typ max min typ max unit figure external trigger input start delay time t trgs 50 ? ? 50 ? ? ns figure 27.19 a/d conversion time t conv 259 ? 266 131 ? 134 t cyc a/d conversion start delay time t d 10?17 6 ?9 t cyc input sampling time t spl ?64? ?32 t cyc adend output delay time t adendd ? ? 100 ? ? 100 ns figure 27.20 ck input adcr (adst = 1 set) t trgs v ol v ol figure 27.19 external trigger input timing
rev. 3.0, 09/04, page 993 of 1086 ck address analog input sampling signal adf t conv t d t spl (3 states) (up to 14 states) write cycle a/d synchronization time ck adend t adendd t adendd v oh v oh figure 27.20 analog conversion timing
rev. 3.0, 09/04, page 994 of 1086 27.3.11 h-udi timing table 27.16 shows h-udi timing. table 27.16 h-udi timing conditions: v cc = pllv cc = 3.3 v 0.3 v, pv cc 1 = 5.0 v 0.5 v/3.3 v 0.3 v, pv cc 2 = 5.0 v 0.5 v, av cc = 5.0 v 0.5 v, av ref = 4.5 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?40 c to 125 c. when pv cc 1 = 3.3 v 0.3 v, v cc = pv cc 1. when writing or erasing on-chip flash memory, t a = ?40 c to 85 c. item symbol min max unit figures tck clock cycle t tcyc 2?t tcyc tck clock high-level width t tckh 0.4 0.6 t tcyc tck clock low-level width t tckl 0.4 0.6 t tcyc figure 27.21 trst pulse width t trsw 20 ? t cyc trst setup time t trss 30 ? ns figure 27.22 tms setup time t tmss 30 ? ns tms hold time t tmsh 10 ? ns tdi setup time t tdis 30 ? ns tdi hold time t tdih 10 ? ns tdo delay time 1 t tdod1 ?30ns figure 27.23 tdo delay time 2 t tdod2 ? 30 ns figure 27.24 [operating precautions] the h-udi pins constitute a circuit requiring the voltage of v cc = 3.3 v 0.3 v. comply with the input and output voltages specified in the dc characteristics, for operation. t tckh t tcyc v ih tck v ih v il v il v ih t tckl figure 27.21 h-udi clock timing
rev. 3.0, 09/04, page 995 of 1086 t trss t trss v il v il v il v il tck t trsw figure 27.22 h-udi trst trst trst trst timing tck tms tdi tdo t tmss t tmsh v il v ih v ih t tdis t tdih t tdod t tdod figure 27.23 h-udi input/output timing tck tms tdi tdo t tmss t tmsh v il v ih v il t tdis t tdih t tdod2 v il t tdod2 figure 27.24 h-udi input/output timing (instruction corresponding to ieee1149.1 is executed)
rev. 3.0, 09/04, page 996 of 1086 27.3.12 aud timing table 27.17 shows aud timing. table 27.17 aud timing conditions: v cc = pllv cc = 3.3 v 0.3 v, pv cc 1 = 5.0 v 0.5 v/3.3 v 0.3 v, pv cc 2 = 5.0 v 0.5 v, av cc = 5.0 v 0.5 v, av ref = 4.5 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?40 c to 125 c. when pv cc 1 = 3.3 v 0.3 v, v cc = pv cc 1. when writing or erasing on-chip flash memory, t a = ?40 c to 85 c. item symbol min max unit figures audrst pulse width (branch trace) t audrstw 10 ? t cyc audrst pulse width (ram monitor) t audrstw 5? t rmcyc audmd setup time (branch trace) t audmds 10 ? t cyc audmd setup time (ram monitor) t audmds 5? t rmcyc figure 27.25 branch trace clock cycle t btcyc 11 t cyc branch trace clock duty t btckw 40 60 % branch trace data delay time t btdd ?40 ns branch trace data hold time t btdh 0? ns branch trace sync delay time t btsd ?40 ns branch trace sync hold time t btsh 0? ns figure 27.26 ram monitor clock cycle t rmcyc 100 ? ns ram monitor clock low pulse width t rmckw 45 ? ns ram monitor output data delay time t rmdd 7t rmcyc ? 20 ns ram monitor output data hold time t rmdhd 5? ns ram monitor input data setup time t rmds 20 ? ns ram monitor input data hold time t rmdh 5? ns ram monitor sync setup time t rmss 20 ? ns ram monitor sync hold time t rmsh 5? ns figure 27.27 load conditions: audck (branch trace): cl = 30 pf: otherwise cl = 100 pf audsync: cl = 100 pf audata3 to audata0: cl = 100 pf
rev. 3.0, 09/04, page 997 of 1086 t rmcyc t audrstw t audmds t cyc ck audck (input) (ram monitor) audmd (branch trace) figure 27.25 aud reset timing audck (output) audata3 to audata0 (output) (output) t btdd t btsd t btckw t btcyc t btdh t btsh figure 27.26 branch trace timing audck (input) audata3 to audata0 (output) audata3 to audata0 (input) (input) t rmdd t rmds t rmss t rmdh t rmcyc t rmckw t rmdhd t rmsh figure 27.27 ram monitor timing
rev. 3.0, 09/04, page 998 of 1086 27.3.13 ubc trigger timing table 27.18 shows ubc trigger timing. table 27.18 ubc trigger timing conditions: v cc = pllv cc = 3.3 v 0.3 v, pv cc 1 = 5.0 v 0.5 v/3.3 v 0.3 v, pv cc 2 = 5.0 v 0.5 v, av cc = 5.0 v 0.5 v, av ref = 4.5 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?40 c to 125 c. when pv cc 1 = 3.3 v 0.3 v, v cc = pv cc 1. when writing or erasing on-chip flash memory, t a = ?40 c to 85 c. item symbol min max unit figures ubctrg delay time t ubctgd ? 35 ns figure 27.28 v oh ck t ubctgd note: see section 8.5.7, internal clock ( ) multiplication ratio and pulse width. figure 27.28 ubc trigger timing
rev. 3.0, 09/04, page 999 of 1086 27.3.14 measuring conditions for ac characteristics input reference levels high level: v ih min. value, low level: v il max. value output reference level high level: 2.0 v, low level: 0.8 v i ol i oh c l v ref v dut output lsi output pin c l is a total value that includes the measuring instrument capacitance. the following c l values are used: 30 pf: ck, e , , , , audck 50 pf: a21 ? a0, d15 ? d0, , , , tdo 100 pf: audata3 ? 0, audsync 30 pf: all port pins other than the above, and peripheral module output pins. i ol and i oh are the condition for the i ol = 1.6 ma, i oh = 200 a. figure 27.29 output test circuit
rev. 3.0, 09/04, page 1000 of 1086 27.4 a/d converter characteristics table 27.19 shows a/d converter characteristics. table 27.19 a/d converter characteristics conditions: v cc = pllv cc = 3.3 v 0.3 v, pv cc 1 = 5.0 v 0.5 v/3.3 v 0.3 v, pv cc 2 = 5.0 v 0.5 v, av cc = 5.0 v 0.5 v, av ref = 4.5 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?40 c to 125 c. when pv cc 1 = 3.3 v 0.3 v, v cc = pv cc 1. when writing or erasing on-chip flash memory, t a = ?40 c to 85 c. csk = 0: fop = 10 to 20 mhz csk = 1: fop =10 mhz item min typ max min typ max unit resolution 10 10 10 10 10 10 bit a/d conversion time ? ? 13.3 ? ? 13.4 s analog input capacitance ? ? 20 ? ? 20 pf permitted analog signal source impedance ??3 ??3 k ? non-linear error ? ? 1.5 * 1 2.0 * 2 ?? 1.5 * 1 2.0 * 2 lsb offset error ? ? 1.5 * 1 2.0 * 2 ?? 1.5 * 1 2.0 * 2 lsb full-scale error ? ? 1.5 * 1 2.0 * 2 ?? 1.5 * 1 2.0 * 2 lsb quantization error ? ? 0.5 ? ? 0.5 lsb absolute error ? ? 2.0 * 1 2.5 * 2 ?? 2.0 * 1 2.5 * 2 lsb notes: 1. ta 105 c 2. ta > 105 c
rev. 3.0, 09/04, page 1001 of 1086 27.5 flash memory characteristics table 27.20 shows the flash memory characteristics. table 27.20 flash memory characteristics conditions: v cc = pllv cc = 3.3 v 0.3 v, pv cc 1 = 5.0 v 0.5 v/3.3 v 0.3 v, pv cc 2 = 5.0 v 0.5 v, av cc = 5.0 v 0.5 v, av ref = 4.5 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?40 c to 125 c. when pv cc 1 = 3.3 v 0.3 v, v cc = pv cc 1. when writing or erasing on-chip flash memory, t a = ?40 c to 85 c. item symbol min typ max unit programming time * 1 * 2 * 4 t p ? 3 200 ms/128 bytes erase time * 1 * 3 * 5 t e ? 2 20 s/block reprogramming count n wec 100 ? ? times notes: 1. use the on-chip programming/erasing routine for programming/erasure. 2. when all 0 are programmed. 3. 128 kbytes of block 4. the total reprogramming time (programming time + erasing time) is as follows. 40 s (typ.), reference value: 60 s, 80 s (max.) however, 90% of the values are within the reference value. 5. t p , t e distributes focusing on near the typ. value.
rev. 3.0, 09/04, page 1002 of 1086 27.6 usage note 27.6.1 notes on connecting external capacitor for current stabilization the sh7058 includes an internal step-down curcuit to automatically reduce the microporocessor power supply voltage to an appropriate level. between this internal stepped-down power supply (v cl pin) and the v ss pin, an capacitor (0.33 to 0.47 f) for stabilizing the internal voltage. connection of the external capacitor is shown in figure 27.30. the external capacitor should be located near the pin. do not apply any power supply voltage to the v cl pin. one 0.33 to 0.47 f capacitor v cl v ss one 0.33 to 0.47 f capacitor one 0.33 to 0.47 f capacitor v cl v ss v cl v ss external power-supply stabilizing capacitor do not apply any power supply voltage to the v cl pin. use multilayer ceramics capacitors (one 0.33 to 0.47 f capacitor for each v cl pin), which should be located near the pin. figure 27.30 connection of v cl capacitor 27.6.2 notes on mode pin input this electrical characteristics are specified for the combination of mode pins (fwe, md2 to md0) specified in table 27.3. characteristics of combinations other than those in table 27.3 cannot be guaranteed. when power is supplied and in hardware standby mode, mode setup time is determined by tmds1. when power-on reset is performed only by the res pin, mode setup time is differs according to the combination of input to the fwe and md2 to md0. when low is input to the res pin with the pins fwe and md2 to md0 operated in mode specified in table 27.3, the mode setup time is determined by tmds2. when combination which is not specified in table 27.3 is input, the mode setup time is determined by tmds1.
rev. 3.0, 09/04, page 1003 of 1086 table 27.21 mode pin input timing item symbol min typ max unit remark mode setup time 1 t mds1 30 ?? ms mode setup time 2 t mds2 10 ?? t cyc figure 27.31 figure 27.31 mode pin input timing
rev. 3.0, 09/04, page 1004 of 1086
rev. 3.0, 09/04, page 1005 of 1086 appendix a on-chip peripheral module registers a.1 address on-chip peripheral module register addresses and bit names are shown in the following table. 16-bit and 32-bit registers are shown in two and four rows of 8 bits, respectively. table a.1 address bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd000 ? ? ? ? ???? h'ffffd001 mcr mcr7 ? mcr5 ? ? mcr2 mcr1 mcr0 h'ffffd002 ? ? ? ? ???? h'ffffd003 gsr ? ? gsr5 gsr4 gsr3 gsr2 gsr1 gsr0 h'ffffd004 tseg13 tseg12 tseg11 tseg10 ? tseg22 tseg21 tseg20 h'ffffd005 bcr1 ? ? sjw1 sjw0 ? ? ? bsp h'ffffd006 ? ? ? ? ???? h'ffffd007 bcr0 brp7 brp6 brp5 brp4 brp3 brp2 brp1 brp0 h'ffffd008 irr15 irr14 irr13 irr12 irr11 irr10 irr9 irr8 h'ffffd009 irr irr7 irr6 irr5 irr4 irr3 irr2 irr1 irr0 h'ffffd00a imr15 imr14 imr13 imr12 imr11 imr10 imr9 imr8 h'ffffd00b imr imr7 imr6 imr5 imr4 imr3 imr2 imr1 imr0 h'ffffd00c tec7 tec6 tec5 tec4 tec3 tec2 tec1 tec0 h'ffffd00d tec/ rec rec7 rec6 rec5 rec4 rec3 rec2 rec1 rec0 h'ffffd020 txpr1[15] txpr1[14] txpr1[13] txpr1[12] txpr1[11] txpr1[10] txpr1[9] txpr1[8] h'ffffd021 txpr1 txpr1[7] txpr1[6] txpr1[5] txpr1[4] txpr1[3] txpr1[2] txpr1[1] txpr1[0] h'ffffd022 txpr0[15] txpr0[14] txpr0[13] txpr0[12] txpr0[11] txpr0[10] txpr0[9] txpr0[8] h'ffffd023 txpr0 txpr0[7] txpr0[6] txpr0[5] txpr0[4] txpr0[3] txpr0[2] txpr0[1] ? h'ffffd028 txcr1[15] txcr1[14] txcr1[13] txcr1[12] txcr1[11] txcr1[10] txcr1[9] txcr1[8] h'ffffd029 txcr1 txcr1[7] txcr1[6] txcr1[5] txcr1[4] txcr1[3] txcr1[2] txcr1[1] txcr1[0] h'ffffd02a txcr0[15] txcr0[14] txcr0[13] txcr0[12] txcr0[11] txcr0[10] txcr0[9] txcr0[8] h'ffffd02b txcr0 txcr0[7] txcr0[6] txcr0[5] txcr0[4] txcr0[3] txcr0[2] txcr0[1] ? hcan0 (channel 0)
rev. 3.0, 09/04, page 1006 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd030 txack1 [15] txack1 [14] txack1 [13] txack1 [12] txack1 [11] txack1 [10] txack1 [9] txack1 [8] h'ffffd031 txack1 txack1[7] txack1[6] txack1[5] txack1[4] txack1[3] txack1[2] txack1[1] txack1[0] h'ffffd032 txack0 [15] txack0 [14] txack0 [13] txack0 [12] txack0 [11] txack0 [10] txack0 [9] txack0 [8] h'ffffd033 txack0 txack0[7] txack0[6] txack0[5] txack0[4] txack0[3] txack0[2] txack0[1] txack0[0] h'ffffd038 aback1 [15] aback1 [14] aback1 [13] aback1 [12] aback1 [11] aback1 [10] aback1 [9] aback1 [8] h'ffffd039 aback1 aback1 [7] aback1 [6] aback1 [5] aback1 [4] aback1 [3] aback1 [2] aback1 [1] aback1 [0] h'ffffd03a aback0 [15] aback0 [14] aback0 [13] aback0 [12] aback0 [11] aback0 [10] aback0 [9] aback0 [8] h'ffffd03b aback0 aback0 [7] aback0 [6] aback0 [5] aback0 [4] aback0 [3] aback0 [2] aback0 [1] ? h'ffffd040 rxpr1[15] rxpr1[14] rxpr1[13] rxpr1[12] rxpr1[11] rxpr1[10] rxpr1[9] rxpr1[8] h'ffffd041 rxpr1 rxpr1[7] rxpr1[6] rxpr1[5] rxpr1[4] rxpr1[3] rxpr1[2] rxpr1[1] rxpr1[0] h'ffffd042 rxpr0[15] rxpr0[14] rxpr0[13] rxpr0[12] rxpr0[11] rxpr0[10] rxpr0[9] rxpr0[8] h'ffffd043 rxpr0 rxpr0 [7] rxpr0 [6] rxpr0[5] rxpr0[4] rxpr0 [3] rxpr0[2] rxpr0[1] rxpr0 [0] h'ffffd048 rfpr1 [15] rfpr1 [14] rfpr1 [13] rfpr1 [12] rfpr1 [11] rfpr1 [10] rfpr1[9] rfpr1[8] h'ffffd049 rfpr1 rfpr1[7] rfpr1[6] rfpr1[5] rfpr1[4] rfpr1[3] rfpr1[2] rfpr1[1] rfpr1[0] h'ffffd04a rfpr0 [15] rfpr0 [14] rfpr0 [13] rfpr0 [12] rfpr0 [11] rfpr0 [10] rfpr0 [9] rfpr0 [8] h'ffffd04b rfpr0 rfpr0[7] rfpr0[6] rfpr0[5] rfpr0[4] rfpr0[3] rfpr0[2] rfpr0[1] rfpr0[0] h'ffffd050 mbimr1 [15] mbimr1 [14] mbimr1 [13] mbimr1 [12] mbimr1 [11] mbimr1 [10] mbimr1 [9] mbimr1 [8] h'ffffd051 mbimr1 mbimr1[7] mbimr1[6] mbimr1[5] mbimr1[4] mbimr1[3] mbimr1[2] mbimr1[1] mbimr1[0] h'ffffd052 mbimr0 [15] mbimr0 [14] mbimr0 [13] mbimr0 [12] mbimr0 [11] mbimr0 [10] mbimr0 [9] mbimr0 [8] h'ffffd053 mbimr0 mbimr0[7] mbimr0[6] mbimr0[5] mbimr0[4] mbimr0[3] mbimr0[2] mbimr0[1] mbimr0[0] h'ffffd058 umsr1 [15] umsr1 [14] umsr1 [13] umsr1 [12] umsr1 [11] umsr1 [10] umsr1 [9] umsr1 [8] h'ffffd059 umsr1 umsr1[7] umsr1[6] umsr1[5] umsr1[4] umsr1[3] umsr1[2] umsr1[1] umsr1[0] h'ffffd05a umsr0 [15] umsr0 [14] umsr0 [13] umsr0 [12] umsr0 [11] umsr0 [10] umsr0 [9] umsr0 [8] h'ffffd05b umsr0 umsr0[7] umsr0[6] umsr0[5] umsr0[4] umsr0[3] umsr0[2] umsr0[1] umsr0[0] h'ffffd05c -7f ???????? hcan0 (channel 0)
rev. 3.0, 09/04, page 1007 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd080 tcntr15 tcntr14 tcntr13 tcntr12 tcntr11 tcntr10 tcntr9 tcntr8 h'ffffd081 tcntr tcntr7 tcntr6 tcntr5 tcntr4 tcntr3 tcntr2 tcntr1 tcntr0 h'ffffd082 tcr15 tcr14 tcr13 tcr12 tcr11 tcr10 tcr9 ? h'ffffd083 tcr tcr7 ? tpsc5 tpsc4 tpsc3 tpsc2 tpsc1 tpsc0 h'ffffd084 ? ? ? ? ? ? ? ? h'ffffd085 tsr ? ? ? tsr4 tsr3 tsr2 tsr1 tsr0 h'ffffd086 tdcr15 tdcr14 tdcr13 tdcr12 tdcr11 tdcr10 tdcr9 tdcr8 h'ffffd087 tdcr tdcr7 tdcr6 tdcr5 tdcr4 tdcr3 tdcr2 tdcr1 tdcr0 h'ffffd088 losr15 losr14 losr13 losr12 losr11 losr10 losr9 losr8 h'ffffd089 losr losr7 losr6 losr5 losr4 losr3 losr2 losr1 losr0 h'ffffd08a ? ? ? ? ? ? ? ? h'ffffd08b icr0_cc ????iccr0_cc 3 iccr0_cc 2 iccr0_cc 1 iccr0_cc 0 h'ffffd08c icr0_tm 15 icr0_tm 14 icr0_tm 13 icr0_tm 12 icr0_tm 11 icr0_tm 10 icr0_tm9 icr0_tm8 h'ffffd08d icr0_tm icr0_tm7 icr0_tm6 icr0_tm5 icr0_tm4 icr0_tm3 icr0_tm2 icr0_tm1 icr0_tm0 h'ffffd08e icr1[15] icr1[14] icr1[13] icr1[12] icr1[11] icr1[10] icr1[9] icr1[8] h'ffffd08f icr1 icr1[7] icr1[6] icr1[5] icr1[4] icr1[3] icr1[2] icr1[1] icr1[0] h'ffffd090 tcmr0 [15] tcmr0 [14] tcmr0 [13] tcmr0 [12] tcmr0 [11] tcmr0 [10] tcmr0 [9] tcmr0 [8] h'ffffd091 tcmr0 tcmr0[7] tcmr0[6] tcmr0[5] tcmr0[4] tcmr0[3] tcmr0[2] tcmr0[1] tcmr0[0] h'ffffd092 tcmr1 [15] tcmr1 [14] tcmr1 [13] tcmr1 [12] tcmr1 [11] tcmr1 [10] tcmr1 [9] tcmr1 [8] h'ffffd093 tcmr1 tcmr1[7] tcmr1[6] tcmr1[5] tcmr1[4] tcmr1[3] tcmr1[2] tcmr1[1] tcmr1[0] h'ffffd094 tcmr2 [15] tcmr2 [14] tcmr2 [13] tcmr2 [12] tcmr2 [11] tcmr2 [10] tcmr2 [9] tcmr2 [8] h'ffffd095 tcmr2 tcmr2[7] tcmr2[6] tcmr2[5] tcmr2[4] tcmr2[3] tcmr2[2] tcmr2[1] tcmr2[0] h'ffffd096 ? ? ? ? ? ? ? ? h'ffffd097 ccr ? ? ? ? ccr3 ccr2 ccr1 ccr0 h'ffffd098 ? ? ? ? ? ? ? ? h'ffffd099 cmax ? ? ? ? cmax3 cmax2 cmax1 cmax0 h'ffffd09a ? ? ? ? ? ? ? ? h'ffffd09b tmr ? ? ? ? tmr3 tmr2 tmr1 ? h'ffffd09c ? ? ? ? ? ? ? ? h'ffffd09d ccr-buf ? ? ? ? ccr- buf3 ccr- buf2 ccr- buf1 ccr- buf0 h'ffffd09e ? ? ? ? ? ? ? ? h'ffffd09f icr0-buf ????icr0- buf3 icr0- buf2 icr0- buf1 icr0- buf0 hcan0 (channel 0) h'ffffd0a0 -ff ????????? ?
rev. 3.0, 09/04, page 1008 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd100 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd101 mb0[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd102 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd103 mb0[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd104 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd105 mb0[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd106 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd107 mb0[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd108 msg_data_0 h'ffffd109 mb0[7], [8] * msg_data_1 h'ffffd10a msg_data_2 h'ffffd10b mb0[9], [10] msg_data_3 h'ffffd10c msg_data_4 h'ffffd10d mbx[11], [12] msg_data_5 h'ffffd10e msg_data_6 h'ffffd10f mb0[13], [14] msg_data_7 h'ffffd110 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd111 mb0[15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd112 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd113 mb0[17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd114- 1f ????????? ? h'ffffd120 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd121 mb1[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd122 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd123 mb1[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd124 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd125 mb1[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd126 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd127 mb1[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd128 msg_data_0 h'ffffd129 mb1[7], [8] * msg_data_1 h'ffffd12a msg_data_2 h'ffffd12b mb1[9], [10] msg_data_3 h'ffffd12c msg_data_4 h'ffffd12d mb1[11], [12] msg_data_5 h'ffffd12e msg_data_6 h'ffffd12f mb1[13], [14] msg_data_7 hcan0 (channel 0)
rev. 3.0, 09/04, page 1009 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd130 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd131 mb1[15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd132 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd133 mb1[17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd134 -3f ???????? ? h'ffffd140 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd141 mb2[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd142 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd143 mb2[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd144 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd145 mb2[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd146 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd147 mb2[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd148 msg_data_0 h'ffffd149 mb2[7], [8] * msg_data_1 h'ffffd14a msg_data_2 h'ffffd14b mb2[9], [10] msg_data_3 h'ffffd14c msg_data_4 h'ffffd14d mb2[11], [12] msg_data_5 h'ffffd14e msg_data_6 h'ffffd14f mb2[13], [14] msg_data_7 h'ffffd150 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd151 mb2[15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd152 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd153 mb2[17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd154 -5f ???????? ? h'ffffd160 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd161 mb3[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd162 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd163 mb3[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd164 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd165 mb3[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] hcan0 (channel 0)
rev. 3.0, 09/04, page 1010 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd166 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd167 mb3[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd168 msg_data_0 h'ffffd169 mb3[7], [8] * msg_data_1 h'ffffd16a msg_data_2 h'ffffd16b mb3[9], [10] msg_data_3 h'ffffd16c msg_data_4 h'ffffd16d mb3[11], [12] msg_data_5 h'ffffd16e msg_data_6 h'ffffd16f mb3[13], [14] msg_data_7 h'ffffd170 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd171 mb3[15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd172 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd173 mb3[17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] h'ffffd174- 7f ???????? h'ffffd180 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd181 mb4[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd182 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd183 mb4[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd184 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd185 mb4[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd186 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd187 mb4[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd188 msg_data_0 h'ffffd189 mb4[7], [8] * msg_data_1 h'ffffd18a msg_data_2 h'ffffd18b mb4[9], [10] msg_data_3 h'ffffd18c msg_data_4 h'ffffd18d mb4[11], [12] msg_data_5 h'ffffd18e msg_data_6 h'ffffd18f mb4[13], [14] msg_data_7 h'ffffd190 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd191 mb4[15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] hcan0 (channel 0)
rev. 3.0, 09/04, page 1011 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd192 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd193 mb4[17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] h'ffffd194- 9f ???????? h'ffffd1a0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd1a1 mb5[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd1a2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd1a3 mb5[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd1a4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd1a5 mb5[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd1a6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd1a7 mb5[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd1a8 msg_data_0 h'ffffd1a9 mb5 [7], [8] * msg_data_1 h'ffffd1aa msg_data_2 h'ffffd1ab mb5 [9], [10] msg_data_3 h'ffffd1ac msg_data_4 h'ffffd1ad mb5[11], [12] msg_data_5 h'ffffd1ae msg_data_6 h'ffffd1af mb5[13], [14] msg_data_7 h'ffffd1b0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd1b1 mb5[15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd1b2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd1b3 mb5[17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd1b4 -bf ???????? ? h'ffffd1c0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd1c1 mb6[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd1c2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd1c3 mb6[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd1c4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd1c5 mb6[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd1c6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd1c7 mb6[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd1c8 msg_data_0 h'ffffd1c9 mb6[7], [8] * msg_data_1 hcan0 (channel 0)
rev. 3.0, 09/04, page 1012 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd1ca msg_data_2 h'ffffd1cb mb6[9], [10] msg_data_3 h'ffffd1cc msg_data_4 h'ffffd1cd mb6[11], [12] msg_data_5 h'ffffd1ce msg_data_6 h'ffffd1cf mb6[13], [14] msg_data_7 h'ffffd1d0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd1d1 mb6[15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd1d2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd1d3 mb6[17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd1d4 -df ????????? h'ffffd1e0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd1e1 mb7[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd1e2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd1e3 mb7[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd1e4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd1e5 mb7[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd1e6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd1e7 mb7[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd1e8 msg_data_0 h'ffffd1e9 mb7[7], [8] * msg_data_1 h'ffffd1ea msg_data_2 h'ffffd1eb mb7[9], [10] msg_data_3 h'ffffd1ec msg_data_4 h'ffffd1ed mb7[11], [12] msg_data_5 h'ffffd1ee msg_data_6 h'ffffd1ef mb7[13], [14] msg_data_7 h'ffffd1f0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd1f1 mb7[15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd1f2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd1f3 mb7[17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd1f4 -ff ?????????
rev. 3.0, 09/04, page 1013 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd200 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd201 mb8[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd202 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd203 mb8[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd204 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd205 mb8[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd206 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd207 mb8[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd208 msg_data_0 h'ffffd209 mb8[7], [8] * msg_data_1 h'ffffd20a msg_data_2 h'ffffd20b mb8[9], [10] msg_data_3 h'ffffd20c msg_data_4 h'ffffd20d mb8[11], [12] msg_data_5 h'ffffd20e msg_data_6 h'ffffd20f mb8[13], [14] msg_data_7 h'ffffd210 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd211 mb8[15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd212 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd213 mb8[17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] h'ffffd214- 1f ???????? h'ffffd220 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd221 mb9[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd222 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd223 mb9[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd224 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd225 mb9[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd226 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd227 mb9[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd228 msg_data_0 h'ffffd229 mb9[7], [8] * msg_data_1 h'ffffd22a msg_data_2 h'ffffd22b mb9[9], [10] msg_data_3 h'ffffd22c msg_data_4 h'ffffd22d mb9[11], [12] msg_data_5 h'ffffd22e msg_data_6 h'ffffd22f mb9[13], [14] msg_data_7 hcan0 (channel 0)
rev. 3.0, 09/04, page 1014 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd230 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd231 mb9[15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd232 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd233 mb9[17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd234- 3f ????????? h'ffffd240 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd241 mb10[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd242 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd243 mb10[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd244 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd245 mb10[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd246 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd247 mb10[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd248 msg_data_0 h'ffffd249 mb10[7], [8] * msg_data_1 h'ffffd24a msg_data_2 h'ffffd24b mb10[9], [10] msg_data_3 h'ffffd24c msg_data_4 h'ffffd24d mb10 [11], [12] msg_data_5 h'ffffd24e msg_data_6 h'ffffd24f mb10 [13],[14] msg_data_7 h'ffffd250 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd251 mb10 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd252 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd253 mb10 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd254- 5f ????????? h'ffffd260 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd261 mb11 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd262 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd263 mb11 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd264 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd265 mb11[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] hcan0 (channel 0)
rev. 3.0, 09/04, page 1015 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd266 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd267 mb11[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd268 msg_data_0 h'ffffd269 mb11[7], [8] * msg_data_1 h'ffffd26a msg_data_2 h'ffffd26b mb11[9], [10] msg_data_3 h'ffffd26c msg_data_4 h'ffffd26d mb11 [11], [12] msg_data_5 h'ffffd26e msg_data_6 h'ffffd26f mb11 [13], [14] msg_data_7 h'ffffd270 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd271 mb11 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd272 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd273 mb11 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd274- 7f ????????? h'ffffd280 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd281 mb12[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd282 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd283 mb12[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd284 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd285 mb12[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd286 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd287 mb12[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd288 msg_data_0 h'ffffd289 mb12[7], [8] * msg_data_1 h'ffffd28a msg_data_2 h'ffffd28b mb12[9], [10] msg_data_3 h'ffffd28c msg_data_4 h'ffffd28d mb12 [11], [12] msg_data_5 h'ffffd28e msg_data_6 h'ffffd28f mb12 [13], [14] msg_data_7 h'ffffd290 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd291 mb12 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] hcan0 (channel 0)
rev. 3.0, 09/04, page 1016 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd292 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd293 mb12 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] h'ffffd294- 9f ???????? h'ffffd2a0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd2a1 mb13 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd2a2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd2a3 mb13 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd2a4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd2a5 mb13[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd2a6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd2a7 mb13[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd2a8 msg_data_0 h'ffffd2a9 mb13[7], [8] * msg_data_1 h'ffffd2aa msg_data_2 h'ffffd2ab mb13[9], [10] msg_data_3 h'ffffd2ac msg_data_4 h'ffffd2ad mb13 [11], [12] msg_data_5 h'ffffd2ae msg_data_6 h'ffffd2af mb13 [13], [14] msg_data_7 h'ffffd2b0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd2b1 mb13 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd2b2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd2b3 mb13 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd2b4 -bf ????????? h'ffffd2c0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd2c1 mb14 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd2c2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd2c3 mb14 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd2c4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd2c5 mb14[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd2c6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd2c7 mb14[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd2c8 msg_data_0 h'ffffd2c9 mb14[7], [8] * msg_data_1 hcan0 (channel 0)
rev. 3.0, 09/04, page 1017 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd2ca msg_data_2 h'ffffd2cb mb14[9], [10] msg_data_3 h'ffffd2cc msg_data_4 h'ffffd2cd mb14 [11], [12] msg_data_5 h'ffffd2ce msg_data_6 h'ffffd2cf mb14 [13], [14] msg_data_7 h'ffffd2d0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd2d1 mb14 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd2d2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd2d3 mb14 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd2d4 -df ????????? h'ffffd2e0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd2e1 mb15 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd2e2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd2e3 mb15 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd2e4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd2e5 mb15[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd2e6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd2e7 mb15[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd2e8 msg_data_0 h'ffffd2e9 mb15[7], [8] * msg_data_1 h'ffffd2ea msg_data_2 h'ffffd2eb mb15[9], [10] msg_data_3 h'ffffd2ec msg_data_4 h'ffffd2ed mb15 [11], [12] msg_data_5 h'ffffd2ee msg_data_6 h'ffffd2ef mb15 [13], [14] msg_data_7 h'ffffd2f0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd2f1 mb15 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd2f2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd2f3 mb15 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd2f4 -ff ?????????
rev. 3.0, 09/04, page 1018 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd300 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd301 mb16 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd302 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd303 mb16 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd304 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd305 mb16[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd306 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd307 mb16[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd308 msg_data_0 h'ffffd309 mb16[7], [8] * msg_data_1 h'ffffd30a msg_data_2 h'ffffd30b mb16[9], [10] msg_data_3 h'ffffd30c msg_data_4 h'ffffd30d mb16 [11], [12] msg_data_5 h'ffffd30e msg_data_6 h'ffffd30f mb16 [13], [14] msg_data_7 h'ffffd310 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd311 mb16 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd312 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd313 mb16 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd314- 1f ????????? h'ffffd320 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd321 mb17[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd322 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd323 mb17[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd324 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd325 mb17[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd326 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd327 mb17[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd328 msg_data_0 h'ffffd329 mb17[7], [8] * msg_data_1 h'ffffd32a msg_data_2 h'ffffd32b mb17[9], [10] msg_data_3 h'ffffd32c msg_data_4 h'ffffd32d mb17 [11], [12] msg_data_5 h'ffffd32e msg_data_6 h'ffffd32f mb17 [13], [14] msg_data_7 hcan0 (channel 0)
rev. 3.0, 09/04, page 1019 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd330 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd331 mb17 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd332 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd333 mb17 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] h'ffffd334- 3f ???????? h'ffffd340 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd341 mb18 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd342 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd343 mb18 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd344 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd345 mb18 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd346 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd347 mb18[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd348 msg_data_0 h'ffffd349 mb18[7], [8] * msg_data_1 h'ffffd34a msg_data_2 h'ffffd34b mb18[9], [10] msg_data_3 h'ffffd34c msg_data_4 h'ffffd34d mb18 [11], [12] msg_data_5 h'ffffd34e msg_data_6 h'ffffd34f mb18 [13], [14] msg_data_7 h'ffffd350 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd351 mb18 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd352 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd353 mb18 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] h'ffffd354- 5f ???????? h'ffffd360 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd361 mb19 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd362 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd363 mb19 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd364 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd365 mb19 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] hcan0 (channel 0)
rev. 3.0, 09/04, page 1020 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd366 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd367 mb19[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd368 msg_data_0 h'ffffd369 mb19[7], [8] * msg_data_1 h'ffffd36a msg_data_2 h'ffffd36b mb19[9], [10] msg_data_3 h'ffffd36c msg_data_4 h'ffffd36d mb19 [11], [12] msg_data_5 h'ffffd36e msg_data_6 h'ffffd36f mb19 [13], [14] msg_data_7 h'ffffd370 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd371 mb19 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd372 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd373 mb19 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd374- 7f ????????? h'ffffd380 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd381 mb20 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd382 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd383 mb20 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd384 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd385 mb20[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd386 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd387 mb20[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd388 msg_data_0 h'ffffd389 mb20[7], [8] * msg_data_1 h'ffffd38a msg_data_2 h'ffffd38b mb20[9], [10] msg_data_3 h'ffffd38c msg_data_4 h'ffffd38d mb20 [11], [12] msg_data_5 h'ffffd38e msg_data_6 h'ffffd38f mb20 [13], [14] msg_data_7 h'ffffd390 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd391 mb20 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] hcan0 (channel 0)
rev. 3.0, 09/04, page 1021 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd392 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd393 mb20 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd394- 9f ? ???????? h'ffffd3a0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd3a1 mb21 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd3a2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd3a3 mb21 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd3a4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd3a5 mb21 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd3a6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd3a7 mb21[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd3a8 msg_data_0 h'ffffd3a9 mb21 [7], [8] * msg_data_1 h'ffffd3aa msg_data_2 h'ffffd3ab mb21 [9], [10] msg_data_3 h'ffffd3ac msg_data_4 h'ffffd3ad mb21 [11], [12] msg_data_5 h'ffffd3ae msg_data_6 h'ffffd3af mb21 [13], [14] msg_data_7 h'ffffd3b0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd3b1 mb21 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd3b2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd3b3 mb21 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd3b4 -bf ? ???????? h'ffffd3c0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd3c1 mb22 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd3c2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd3c3 mb22 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd3c4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd3c5 mb22 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd3c6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd3c7 mb22[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd3c8 msg_data_0 h'ffffd3c9 mb22 [7], [8] * msg_data_1 hcan0 (channel 0)
rev. 3.0, 09/04, page 1022 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd3ca msg_data_2 h'ffffd3cb mb22 [9], [10] msg_data_3 h'ffffd3cc msg_data_4 h'ffffd3cd mb22 [11], [12] msg_data_5 h'ffffd3ce msg_data_6 h'ffffd3cf mb22 [13], [14] msg_data_7 h'ffffd3d0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd3d1 mb22 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd3d2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd3d3 mb22 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd3d4 -df ? ???????? h'ffffd3e0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd3e1 mb23 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd3e2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd3e3 mb23 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd3e4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd3e5 mb23 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd3e6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd3e7 mb23[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd3e8 msg_data_0 h'ffffd3e9 mb23 [7], [8] * msg_data_1 h'ffffd3ea msg_data_2 h'ffffd3eb mb23 [9], [10] msg_data_3 h'ffffd3ec msg_data_4 h'ffffd3ed mb23 [11], [12] msg_data_5 h'ffffd3ee msg_data_6 h'ffffd3ef mb23 [13], [14] msg_data_7 h'ffffd3f0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd3f1 mb23 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd3f2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd3f3 mb23 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd3f4 -ff ? ????????
rev. 3.0, 09/04, page 1023 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd400 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd401 mb24 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd402 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd403 mb24 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd404 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd405 mb24 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd406 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd407 mb24[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd408 msg_data_0 h'ffffd409 mb24 [7], [8] * msg_data_1 h'ffffd40a msg_data_2 h'ffffd40b mb24 [9], [10] msg_data_3 h'ffffd40c msg_data_4 h'ffffd40d mb24 [11], [12] msg_data_5 h'ffffd40e msg_data_6 h'ffffd40f mb24 [13], [14] msg_data_7 h'ffffd410 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd411 mb24 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd412 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd413 mb24 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] h'ffffd414- 1f ? ??????? h'ffffd420 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd421 mb25 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd422 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd423 mb25 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd424 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd425 mb25 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd426 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd427 mb25[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd428 msg_data_0 h'ffffd429 mb25 [7], [8] * msg_data_1 h'ffffd42a msg_data_2 h'ffffd42b mb25 [9], [10] msg_data_3 h'ffffd42c msg_data_4 h'ffffd42d mb25 [11], [12] msg_data_5 h'ffffd42e msg_data_6 h'ffffd42f mb25 [13], [14] msg_data_7 hcan0 (channel 0)
rev. 3.0, 09/04, page 1024 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd430 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd431 mb25 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd432 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd433 mb25 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] h'ffffd434- 3f ? ??????? h'ffffd440 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd441 mb26 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd442 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd443 mb26 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd444 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd445 mb26 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd446 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd447 mb26[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd448 msg_data_0 h'ffffd449 mb26 [7], [8] * msg_data_1 h'ffffd44a msg_data_2 h'ffffd44b mb26 [9], [10] msg_data_3 h'ffffd44c msg_data_4 h'ffffd44d mb26 [11], [12] msg_data_5 h'ffffd44e msg_data_6 h'ffffd44f mb26 [13] ,[14] msg_data_7 h'ffffd450 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd451 mb26 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd452 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd453 mb26 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd454- 5f ? ???????? h'ffffd460 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd461 mb27 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd462 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd463 mb27 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd464 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd465 mb27 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] hcan0 (channel 0)
rev. 3.0, 09/04, page 1025 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd466 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd467 mb27[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd468 msg_data_0 h'ffffd469 mb27 [7], [8] * msg_data_1 h'ffffd46a msg_data_2 h'ffffd46b mb27 [9],[10] msg_data_3 h'ffffd46c msg_data_4 h'ffffd46d mb27 [11], [12] msg_data_5 h'ffffd46e msg_data_6 h'ffffd46f mb27 [13],[14] msg_data_7 h'ffffd470 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd471 mb27 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd472 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd473 mb27 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd474- 7f ? ???????? h'ffffd480 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd481 mb28 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd482 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd483 mb28 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd484 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd485 mb28 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd486 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd487 mb28[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd488 msg_data_0 h'ffffd489 mb28 [7], [8] * msg_data_1 h'ffffd48a msg_data_2 h'ffffd48b mb28 [9], [10] msg_data_3 h'ffffd48c msg_data_4 h'ffffd48d mb28 [11], [12] msg_data_5 h'ffffd48e msg_data_6 h'ffffd48f mb28 [13], [14] msg_data_7 h'ffffd490 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd491 mb28 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] hcan0 (channel 0)
rev. 3.0, 09/04, page 1026 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd492 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd493 mb28 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] h'ffffd494- 7f ? ??????? h'ffffd4a0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd4a1 mb29 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd4a2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd4a3 mb29 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd4a4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd4a5 mb29 [4],[5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd4a6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd4a7 mb29[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd4a8 msg_data_0 h'ffffd4a9 mb29 [7],[8] * msg_data_1 h'ffffd4aa msg_data_2 h'ffffd4ab mb29 [9],[10] msg_data_3 h'ffffd4ac msg_data_4 h'ffffd4ad mb29 [11],[12] msg_data_5 h'ffffd4ae msg_data_6 h'ffffd4af mb29 [13],[14] msg_data_7 h'ffffd4b0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd4b1 mb29 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd4b2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd4b3 mb29 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd4b4 -bf ? ???????? h'ffffd4c0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd4c1 mb30 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd4c2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd4c3 mb30 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd4c4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd4c5 mb30 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd4c6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd4c7 mb30[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd4c8 msg_data_0 h'ffffd4c9 mb30 [7], [8] * msg_data_1 hcan0 (channel 0)
rev. 3.0, 09/04, page 1027 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd4ca msg_data_2 h'ffffd4cb mb30 [9],[10] msg_data_3 h'ffffd4cc msg_data_4 h'ffffd4cd mb30 [11],[12] msg_data_5 h'ffffd4ce msg_data_6 h'ffffd4cf mb30 [13],[14] msg_data_7 h'ffffd4d0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd4d1 mb30 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd4d2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd4d3 mb30 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd4d4 -df ? ???????? h'ffffd4e0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd4e1 mb31 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd4e2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd4e3 mb31 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd4e4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd4e5 mb31 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd4e6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd4e7 mb31[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd4e8 msg_data_0 h'ffffd4e9 mb31 [7], [8] * msg_data_1 h'ffffd4ea msg_data_2 h'ffffd4eb mb31 [9], [10] msg_data_3 h'ffffd4ec msg_data_4 h'ffffd4ed mb31 [11], [12] msg_data_5 h'ffffd4ee msg_data_6 h'ffffd4ef mb31 [13], [14] msg_data_7 h'ffffd4f0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd4f1 mb31 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd4f2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd4f3 mb31 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan0 (channel 0) h'ffffd4f4 -7ff ? ????????
rev. 3.0, 09/04, page 1028 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd800 ? ? ? ? ? ? ? ? h'ffffd801 mcr mcr7 ? mcr5 ? ? mcr2 mcr1 mcr0 h'ffffd802 ? ? ? ? ? ? ? ? h'ffffd803 gsr ? ? gsr5 gsr4 gsr3 gsr2 gsr1 gsr0 h'ffffd804 tseg13 tseg12 tseg11 tseg10 ? tseg22 tseg21 tseg20 h'ffffd805 bcr1 ? ? sjw1 sjw0 ? ? ? bsp h'ffffd806 ? ? ? ? ? ? ? ? h'ffffd807 bcr0 brp7 brp6 brp5 brp4 brp3 brp2 brp1 brp0 h'ffffd808 irr15 irr14 irr13 irr12 irr11 irr10 irr9 irr8 h'ffffd809 irr irr7 irr6 irr5 irr4 irr3 irr2 irr1 irr0 h'ffffd80a imr15 imr14 imr13 imr12 imr11 imr10 imr9 imr8 h'ffffd80b imr imr7 imr6 imr5 imr4 imr3 imr2 imr1 imr0 h'ffffd80c tec7 tec6 tec5 tec4 tec3 tec2 tec1 tec0 h'ffffd80d tec/ rec rec7 rec6 rec5 rec4 rec3 rec2 rec1 rec0 h'ffffd820 txpr1[15] txpr1[14] txpr1[13] txpr1[12] txpr1[11] txpr1[10] txpr1[9] txpr1[8] h'ffffd821 txpr1 txpr1[7] txpr1[6] txpr1[5] txpr1[4] txpr1[3] txpr1[2] txpr1[1] txpr1[0] h'ffffd822 txpr0[15] txpr0[14] txpr0[13] txpr0[12] txpr0[11] txpr0[10] txpr0[9] txpr0[8] h'ffffd823 txpr0 txpr0[7] txpr0[6] txpr0[5] txpr0[4] txpr0[3] txpr0[2] txpr0[1] ? h'ffffd828 txcr1[15] txcr1[14] txcr1[13] txcr1[12] txcr1[11] txcr1[10] txcr1[9] txcr1[8] h'ffffd829 txcr1 txcr1[7] txcr1[6] txcr1[5] txcr1[4] txcr1[3] txcr1[2] txcr1[1] txcr1[0] h'ffffd82a txcr0[15] txcr0[14] txcr0[13] txcr0[12] txcr0[11] txcr0[10] txcr0[9] txcr0[8] h'ffffd82b txcr0 txcr0[7] txcr0[6] txcr0[5] txcr0[4] txcr0[3] txcr0[2] txcr0[1] ? h'ffffd830 txack1 [15] txack1 [14] txack1 [13] txack1 [12] txack1 [11] txack1 [10] txack1 [9] txack1 [8] h'ffffd831 txack1 txack1[7] txack1[6] txack1[5] txack1[4] txack1[3] txack1[2] txack1[1] txack1[0] h'ffffd832 txack0 [15] txack0 [14] txack0 [13] txack0 [12] txack0 [11] txack0 [10] txack0 [9] txack0 [8] h'ffffd833 txack0 txack0[7] txack0[6] txack0[5] txack0[4] txack0[3] txack0[2] txack0[1] txack0[0] h'ffffd838 aback1 [15] aback1 [14] aback1 [13] aback1 [12] aback1 [11] aback1 [10] aback1 [9] aback1 [8] h'ffffd839 aback1 aback1 [7] aback1 [6] aback1 [5] aback1 [4] aback1 [3] aback1 [2] aback1 [1] aback1 [0] h'ffffd83a aback0 [15] aback0 [14] aback0 [13] aback0 [12] aback0 [11] aback0 [10] aback0 [9] aback0 [8] h'ffffd83b aback0 aback0 [7] aback0 [6] aback0 [5] aback0 [4] aback0 [3] aback0 [2] aback0 [1] ? h'ffffd840 rxpr1[15] rxpr1[14] rxpr1[13] rxpr1[12] rxpr1[11] rxpr1[10] rxpr1[9] rxpr1[8] h'ffffd841 rxpr1 rxpr1[7] rxpr1[6] rxpr1[5] rxpr1[4] rxpr1[3] rxpr1[2] rxpr1[1] rxpr1[0] hcan1 (channel 1)
rev. 3.0, 09/04, page 1029 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd842 rxpr0[15] rxpr0[14] rxpr0[13] rxpr0[12] rxpr0[11] rxpr0[10] rxpr0 [9] rxpr0[8] h'ffffd843 rxpr0 rxpr0 [7] rxpr0 [6] rxpr0[5] rxpr0[4] rxpr0 [3] rxpr0[2] rxpr0[1] rxpr0 [0] h'ffffd848 rfpr1 [15] rfpr1 [14] rfpr1 [13] rfpr1 [12] rfpr1 [11] rfpr1 [10] rfpr1 [9] rfpr1 [8] h'ffffd849 rfpr1 rfpr1[7] rfpr1[6] rfpr1[5] rfpr1[4] rfpr1[3] rfpr1[2] rfpr1[1] rfpr1[0] h'ffffd84a rfpr0 [15] rfpr0 [14] rfpr0 [13] rfpr0 [12] rfpr0 [11] rfpr0 [10] rfpr0 [9] rfpr0 [8] h'ffffd84b rfpr0 rfpr0[7] rfpr0[6] rfpr0[5] rfpr0[4] rfpr0[3] rfpr0[2] rfpr0[1] rfpr0[0] h'ffffd850 mbimr1 [15] mbimr1 [14] mbimr1 [13] mbimr1 [12] mbimr1 [11] mbimr1 [10] mbimr1 [9] mbimr1 [8] h'ffffd851 mbimr1 mbimr1[7] mbimr1[6] mbimr1[5] mbimr1[4] mbimr1[3] mbimr1[2] mbimr1[1] mbimr1[0] h'ffffd852 mbimr0 [15] mbimr0 [14] mbimr0 [13] mbimr0 [12] mbimr0 [11] mbimr0 [10] mbimr0 [9] mbimr0 [8] h'ffffd853 mbimr0 mbimr0[7] mbimr0[6] mbimr0[5] mbimr0[4] mbimr0[3] mbimr0[2] mbimr0[1] mbimr0[0] h'ffffd858 umsr1 [15] umsr1 [14] umsr1 [13] umsr1 [12] umsr1 [11] umsr1 [10] umsr1 [9] umsr1 [8] h'ffffd859 umsr1 umsr1[7] umsr1[6] umsr1[5] umsr1[4] umsr1[3] umsr1[2] umsr1[1] umsr1[0] h'ffffd85a umsr0 [15] umsr0 [14] umsr0 [13] umsr0 [12] umsr0 [11] umsr0 [10] umsr0 [9] umsr0 [8] h'ffffd85b umsr0 umsr0[7] umsr0[6] umsr0[5] umsr0[4] umsr0[3] umsr0[2] umsr0[1] umsr0[0] h'ffffd85c -7f ? ??????? h'ffffd880 tcntr15 tcntr14 tcntr13 tcntr12 tcntr11 tcntr10 tcntr9 tcntr8 h'ffffd881 tcntr tcntr7 tcntr6 tcntr5 tcntr4 tcntr3 tcntr2 tcntr1 tcntr0 h'ffffd882 tcr15 tcr14 tcr13 tcr12 tcr11 tcr10 tcr9 ? h'ffffd883 tcr tcr7 ? tpsc5 tpsc4 tpsc3 tpsc2 tpsc1 tpsc0 h'ffffd884 ? ? ? ? ? ? ? ? h'ffffd885 tsr ? ? ? tsr4 tsr3 tsr2 tsr1 tsr0 h'ffffd886 tdcr15 tdcr14 tdcr13 tdcr12 tdcr11 tdcr10 tdcr9 tdcr8 h'ffffd887 tdcr tdcr7 tdcr6 tdcr5 tdcr4 tdcr3 tdcr2 tdcr1 tdcr0 h'ffffd888 losr15 losr14 losr13 losr12 losr11 losr10 losr9 losr8 h'ffffd889 losr losr7 losr6 losr5 losr4 losr3 losr2 losr1 losr0 h'ffffd88a ? ? ? ? ? ? ? ? h'ffffd88b icr0_cc ? ? ? ? iccr0_cc 3 iccr0_cc 2 iccr0_cc 1 iccr0_cc 0 h'ffffd88c icr0_tm 15 icr0_tm 14 icr0_tm 13 icr0_tm 12 icr0_tm 11 icr0_tm 10 icr0_tm9 icr0_tm8 h'ffffd88d icr0_tm icr0_tm7 icr0_tm6 icr0_tm5 icr0_tm4 icr0_tm3 icr0_tm2 icr0_tm1 icr0_tm0 h'ffffd88e icr1[15] icr1[14] icr1[13] icr1[12] icr1[11] icr1[10] icr1[9] icr1[8] h'ffffd88f icr1 icr1[7] icr1[6] icr1[5] icr1[4] icr1[3] icr1[2] icr1[1] icr1[0] hcan1 (channel 1)
rev. 3.0, 09/04, page 1030 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd890 tcmr0 [15] tcmr0 [14] tcmr0 [13] tcmr0 [12] tcmr0 [11] tcmr0 [10] tcmr0 [9] tcmr0 [8] h'ffffd891 tcmr0 tcmr0[7] tcmr0[6] tcmr0[5] tcmr0[4] tcmr0[3] tcmr0[2] tcmr0[1] tcmr0[0] h'ffffd892 tcmr1 [15] tcmr1 [14] tcmr1 [13] tcmr1 [12] tcmr1 [11] tcmr1 [10] tcmr1 [9] tcmr1 [8] h'ffffd893 tcmr1 tcmr1[7] tcmr1[6] tcmr1[5] tcmr1[4] tcmr1[3] tcmr1[2] tcmr1[1] tcmr1[0] h'ffffd894 tcmr2 [15] tcmr2 [14] tcmr2 [13] tcmr2 [12] tcmr2 [11] tcmr2 [10] tcmr2 [9] tcmr2 [8] h'ffffd895 tcmr2 tcmr2[7] tcmr2[6] tcmr2[5] tcmr2[4] tcmr2[3] tcmr2[2] tcmr2[1] tcmr2[0] h'ffffd896 ? ? ? ? ? ? ? ? h'ffffd897 ccr ? ? ? ? ccr3 ccr2 ccr1 ccr0 h'ffffd898 ? ? ? ? ? ? ? ? h'ffffd899 cmax ? ? ? ? cmax3 cmax2 cmax1 cmax0 h'ffffd89a ? ? ? ? ? ? ? ? h'ffffd89b tmr ? ? ? ? tmr3 tmr2 tmr1 ? h'ffffd89c ? ? ? ? ? ? ? ? h'ffffd89d ccr- buf ? ? ? ? ccr- buf3 ccr- buf2 ccr- buf1 ccr- buf0 h'ffffd89e ? ? ? ? ? ? ? ? h'ffffd89f icr0- buf ? ? ? ? icr0- buf3 icr0- buf2 icr0- buf1 icr0- buf0 hcan1 (channel 1) h'ffffd8a0 -ff ?? ???????? h'ffffd900 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd901 mb0[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd902 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd903 mb0[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd904 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd905 mb0[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd906 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd907 mb0[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd908 msg_data_0 h'ffffd909 mb0[7], [8] * msg_data_1 h'ffffd90a msg_data_2 h'ffffd90b mb0[9], [10] msg_data_3 h'ffffd90c msg_data_4 h'ffffd90d mbx[11], [12] msg_data_5 h'ffffd90e msg_data_6 h'ffffd90f mb0[13], [14] msg_data_7 h'ffffd910 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd911 mb0[15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] hcan1 (channel 1)
rev. 3.0, 09/04, page 1031 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd912 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd913 mb0[17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffd914- 1f ?? ???????? h'ffffd920 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd921 mb1[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd922 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd923 mb1[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd924 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd925 mb1[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd926 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd927 mb1[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd928 msg_data_0 h'ffffd929 mb1[7], [8] * msg_data_1 h'ffffd92a msg_data_2 h'ffffd92b mb1[9], [10] msg_data_3 h'ffffd92c msg_data_4 h'ffffd92d mb1[11], [12] msg_data_5 h'ffffd92e msg_data_6 h'ffffd92f mb1[13], [14] msg_data_7 h'ffffd930 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd931 mb1[15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd932 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd933 mb1[17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffd934- 3f ? ???????? h'ffffd940 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd941 mb2[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd942 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd943 mb2[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd944 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd945 mb2[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd946 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd947 mb2[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd948 msg_data_0 h'ffffd949 mb2[7], [8] * msg_data_1 hcan1 (channel 1)
rev. 3.0, 09/04, page 1032 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd94a msg_data_2 h'ffffd94b mb2[9], [10] msg_data_3 h'ffffd94c msg_data_4 h'ffffd94d mb2[11], [12] msg_data_5 h'ffffd94e msg_data_6 h'ffffd94f mb2[13], [14] msg_data_7 h'ffffd950 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd951 mb2[15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd952 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd953 mb2[17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffd954- 5f ? ???????? h'ffffd960 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd961 mb3[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd962 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd963 mb3[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd964 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd965 mb3[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd966 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd967 mb3[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd968 msg_data_0 h'ffffd969 mb3[7], [8] * msg_data_1 h'ffffd96a msg_data_2 h'ffffd96b mb3[9], [10] msg_data_3 h'ffffd96c msg_data_4 h'ffffd96d mb3[11], [12] msg_data_5 h'ffffd96e msg_data_6 h'ffffd96f mb3[13], [14] msg_data_7 h'ffffd970 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd971 mb3[15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd972 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd973 mb3[17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] h'ffffd974- 7f ? ??????? h'ffffd980 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd981 mb4[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] hcan1 (channel 1)
rev. 3.0, 09/04, page 1033 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd982 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd983 mb4[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd984 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd985 mb4[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd986 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd987 mb4[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd988 msg_data_0 h'ffffd989 mb4[7], [8] * msg_data_1 h'ffffd98a msg_data_2 h'ffffd98b mb4[9], [10] msg_data_3 h'ffffd98c msg_data_4 h'ffffd98d mb4[11], [12] msg_data_5 h'ffffd98e msg_data_6 h'ffffd98f mb4[13], [14] msg_data_7 h'ffffd990 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd991 mb4[15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd992 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd993 mb4[17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] h'ffffd994- 9f ? ??????? h'ffffd9a0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd9a1 mb5[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd9a2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd9a3 mb5[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd9a4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd9a5 mb5[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd9a6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd9a7 mb5[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd9a8 msg_data_0 h'ffffd9a9 mb5 [7], [8] * msg_data_1 h'ffffd9aa msg_data_2 h'ffffd9ab mb5 [9], [10] msg_data_3 h'ffffd9ac msg_data_4 h'ffffd9ad mb5[11], [12] msg_data_5 h'ffffd9ae msg_data_6 h'ffffd9af mb5[13], [14] msg_data_7 hcan1 (channel 1)
rev. 3.0, 09/04, page 1034 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd9b0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd9b1 mb5[15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd9b2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd9b3 mb5[17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffd9b4 -bf ? ???????? h'ffffd9c0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd9c1 mb6[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd9c2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd9c3 mb6[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd9c4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd9c5 mb6[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffd9c6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd9c7 mb6[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd9c8 msg_data_0 h'ffffd9c9 mb6[7], [8] * msg_data_1 h'ffffd9ca msg_data_2 h'ffffd9cb mb6[9], [10] msg_data_3 h'ffffd9cc msg_data_4 h'ffffd9cd mb6[11], [12] msg_data_5 h'ffffd9ce msg_data_6 h'ffffd9cf mb6[13], [14] msg_data_7 h'ffffd9d0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd9d1 mb6[15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd9d2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd9d3 mb6[17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffd9d4 -df ? ???????? h'ffffd9e0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffd9e1 mb7[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffd9e2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffd9e3 mb7[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffd9e4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffd9e5 mb7[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] hcan1 (channel 1)
rev. 3.0, 09/04, page 1035 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffd9e6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffd9e7 mb7[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffd9e8 msg_data_0 h'ffffd9e9 mb7[7], [8] * msg_data_1 h'ffffd9ea msg_data_2 h'ffffd9eb mb7[9], [10] msg_data_3 h'ffffd9ec msg_data_4 h'ffffd9ed mb7[11], [12] msg_data_5 h'ffffd9ee msg_data_6 h'ffffd9ef mb7[13], [14] msg_data_7 h'ffffd9f0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffd9f1 mb7[15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffd9f2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffd9f3 mb7[17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffd9f4 -ff ? ???????? h'ffffda00 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffda01 mb8[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffda02 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffda03 mb8[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffda04 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffda05 mb8[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffda06 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffda07 mb8[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffda08 msg_data_0 h'ffffda09 mb8[7], [8] * msg_data_1 h'ffffda0a msg_data_2 h'ffffda0b mb8[9], [10] msg_data_3 h'ffffda0c msg_data_4 h'ffffda0d mb8[11], [12] msg_data_5 h'ffffda0e msg_data_6 h'ffffda0f mb8[13], [14] msg_data_7 h'ffffda10 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffda11 mb8[15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] hcan1 (channel 1)
rev. 3.0, 09/04, page 1036 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffda12 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffda13 mb8[17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] h'ffffda14 -1f ? ??????? h'ffffda20 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffda21 mb9[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffda22 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffda23 mb9[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffda24 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffda25 mb9[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffda26 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffda27 mb9[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffda28 msg_data_0 h'ffffda29 mb9[7], [8] * msg_data_1 h'ffffda2a msg_data_2 h'ffffda2b mb9[9], [10] msg_data_3 h'ffffda2c msg_data_4 h'ffffda2d mb9[11], [12] msg_data_5 h'ffffda2e msg_data_6 h'ffffda2f mb9[13], [14] msg_data_7 h'ffffda30 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffda31 mb9[15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffda32 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffda33 mb9[17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffda34 -3f ? ???????? h'ffffda40 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffda41 mb10[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffda42 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffda43 mb10[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffda44 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffda45 mb10[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffda46 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffda47 mb10[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffda48 msg_data_0 h'ffffda49 mb10[7], [8] * msg_data_1 hcan1 (channel 1)
rev. 3.0, 09/04, page 1037 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffda4a msg_data_2 h'ffffda4b mb10[9], [10] msg_data_3 h'ffffda4c msg_data_4 h'ffffda4d mb10 [11], [12] msg_data_5 h'ffffda4e msg_data_6 h'ffffda4f mb10 [13],[14] msg_data_7 h'ffffda50 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffda51 mb10 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffda52 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffda53 mb10 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffda54 -5f ? ???????? h'ffffda60 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffda61 mb11 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffda62 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffda63 mb11 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffda64 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffda65 mb11[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffda66 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffda67 mb11[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffda68 msg_data_0 h'ffffda69 mb11[7], [8] * msg_data_1 h'ffffda6a msg_data_2 h'ffffda6b mb11[9], [10] msg_data_3 h'ffffda6c msg_data_4 h'ffffda6d mb11 [11], [12] msg_data_5 h'ffffda6e msg_data_6 h'ffffda6f mb11 [13], [14] msg_data_7 h'ffffda70 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffda71 mb11 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffda72 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffda73 mb11 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffda74 -7f ? ????????
rev. 3.0, 09/04, page 1038 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffda80 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffda81 mb12[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffda82 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffda83 mb12[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffda84 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffda85 mb12[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffda86 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffda87 mb12[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffda88 msg_data_0 h'ffffda89 mb12[7], [8] * msg_data_1 h'ffffda8a msg_data_2 h'ffffda8b mb12[9], [10] msg_data_3 h'ffffda8c msg_data_4 h'ffffda8d mb12 [11], [12] msg_data_5 h'ffffda8e msg_data_6 h'ffffda8f mb12 [13], [14] msg_data_7 h'ffffda90 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffda91 mb12 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffda92 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffda93 mb12 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] h'ffffda94 -9f ? ??????? h'ffffdaa0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffdaa1 mb13 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffdaa2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffdaa3 mb13 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffdaa4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffdaa5 mb13[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffdaa6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffdaa7 mb13[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffdaa8 msg_data_0 h'ffffdaa9 mb13[7], [8] * msg_data_1 h'ffffdaaa msg_data_2 h'ffffdaab mb13[9], [10] msg_data_3 h'ffffdaa c msg_data_4 h'ffffdaa d mb13 [11], [12] msg_data_5 h'ffffdaae msg_data_6 h'ffffdaaf mb13 [13], [14] msg_data_7 hcan1 (channel 1)
rev. 3.0, 09/04, page 1039 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffdab0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffdab1 mb13 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffdab2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffdab3 mb13 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffdab4 -bf ? ???????? h'ffffdac0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffdac1 mb14 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffdac2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffdac3 mb14 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffdac4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffdac5 mb14[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffdac6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffdac7 mb14[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffdac8 msg_data_0 h'ffffdac9 mb14[7], [8] * msg_data_1 h'ffffdac a msg_data_2 h'ffffdac b mb14[9], [10] msg_data_3 h'ffffdac c msg_data_4 h'ffffdac d mb14 [11], [12] msg_data_5 h'ffffdac e msg_data_6 h'ffffdacf mb14 [13], [14] msg_data_7 h'ffffdad0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffdad1 mb14 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffdad2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffdad3 mb14 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffdad4 -df ? ???????? h'ffffdae0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffdae1 mb15 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffdae2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffdae3 mb15 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffdae4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffdae5 mb15[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] hcan1 (channel 1)
rev. 3.0, 09/04, page 1040 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffdae6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffdae7 mb15[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffdae8 msg_data_0 h'ffffdae9 mb15[7], [8] * msg_data_1 h'ffffdaea msg_data_2 h'ffffdaeb mb15[9], [10] msg_data_3 h'ffffdae c msg_data_4 h'ffffdae d mb15 [11], [12] msg_data_5 h'ffffdaee msg_data_6 h'ffffdaef mb15 [13], [14] msg_data_7 h'ffffdaf0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffdaf1 mb15 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffdaf2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffdaf3 mb15 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffdaf4 -ff ? ???????? h'ffffdb00 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffdb01 mb16 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffdb02 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffdb03 mb16 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffdb04 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffdb05 mb16[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffdb06 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffdb07 mb16[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffdb08 msg_data_0 h'ffffdb09 mb16[7], [8] * msg_data_1 h'ffffdb0a msg_data_2 h'ffffdb0b mb16[9], [10] msg_data_3 h'ffffdb0c msg_data_4 h'ffffdb0d mb16 [11], [12] msg_data_5 h'ffffdb0e msg_data_6 h'ffffdb0f mb16 [13], [14] msg_data_7 h'ffffdb10 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffdb11 mb16 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] hcan1 (channel 1)
rev. 3.0, 09/04, page 1041 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffdb12 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffdb13 mb16 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffdb14 -1f ? ???????? h'ffffdb20 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffdb21 mb17[0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffdb22 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffdb23 mb17[2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffdb24 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffdb25 mb17[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffdb26 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffdb27 mb17[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffdb28 msg_data_0 h'ffffdb29 mb17[7], [8] * msg_data_1 h'ffffdb2a msg_data_2 h'ffffdb2b mb17[9], [10] msg_data_3 h'ffffdb2c msg_data_4 h'ffffdb2d mb17 [11], [12] msg_data_5 h'ffffdb2e msg_data_6 h'ffffdb2f mb17 [13], [14] msg_data_7 h'ffffdb30 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffdb31 mb17 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffdb32 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffdb33 mb17 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffdb34 -3f ? ???????? h'ffffdb40 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffdb41 mb18 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffdb42 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffdb43 mb18 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffdb44 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffdb45 mb18 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffdb46 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffdb47 mb18[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffdb48 msg_data_0 h'ffffdb49 mb18[7], [8] * msg_data_1 hcan1 (channel 1)
rev. 3.0, 09/04, page 1042 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffdb4a msg_data_2 h'ffffdb4b mb18[9], [10] msg_data_3 h'ffffdb4c msg_data_4 h'ffffdb4d mb18 [11], [12] msg_data_5 h'ffffdb4e msg_data_6 h'ffffdb4f mb18 [13], [14] msg_data_7 h'ffffdb50 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffdb51 mb18 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffdb52 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffdb53 mb18 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] h'ffffdb54 -5f ? ??????? h'ffffdb60 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffdb61 mb19 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffdb62 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffdb63 mb19 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffdb64 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffdb65 mb19 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffdb66 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffdb67 mb19[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffdb68 msg_data_0 h'ffffdb69 mb19[7], [8] * msg_data_1 h'ffffdb6a msg_data_2 h'ffffdb6b mb19[9], [10] msg_data_3 h'ffffdb6c msg_data_4 h'ffffdb6d mb19 [11], [12] msg_data_5 h'ffffdb6e msg_data_6 h'ffffdb6f mb19 [13], [14] msg_data_7 h'ffffdb70 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffdb71 mb19 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffdb72 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffdb73 mb19 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffdb74 -7f ? ????????
rev. 3.0, 09/04, page 1043 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffdb80 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffdb81 mb20 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffdb82 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffdb83 mb20 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffdb84 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffdb85 mb20[4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffdb86 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffdb87 mb20[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffdb88 msg_data_0 h'ffffdb89 mb20[7], [8] * msg_data_1 h'ffffdb8a msg_data_2 h'ffffdb8b mb20[9], [10] msg_data_3 h'ffffdb8c msg_data_4 h'ffffdb8d mb20 [11], [12] msg_data_5 h'ffffdb8e msg_data_6 h'ffffdb8f mb20 [13], [14] msg_data_7 h'ffffdb90 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffdb91 mb20 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffdb92 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffdb93 mb20 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffdb94 -9f ? ???????? h'ffffdba0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffdba1 mb21 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffdba2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffdba3 mb21 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffdba4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffdba5 mb21 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffdba6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffdba7 mb21[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffdba8 msg_data_0 h'ffffdba9 mb21 [7], [8] * msg_data_1 h'ffffdbaa msg_data_2 h'ffffdbab mb21 [9], [10] msg_data_3 h'ffffdba c msg_data_4 h'ffffdba d mb21 [11], [12] msg_data_5 h'ffffdbae msg_data_6 h'ffffdbaf mb21 [13], [14] msg_data_7 hcan1 (channel 1)
rev. 3.0, 09/04, page 1044 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffdbb0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffdbb1 mb21 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffdbb2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffdbb3 mb21 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffdbb4 -bf ? ???????? h'ffffdbc0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffdbc1 mb22 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffdbc2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffdbc3 mb22 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffdbc4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffdbc5 mb22 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffdbc6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffdbc7 mb22[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffdbc8 msg_data_0 h'ffffdbc9 mb22 [7], [8] * msg_data_1 h'ffffdbc a msg_data_2 h'ffffdbc b mb22 [9], [10] msg_data_3 h'ffffdbc c msg_data_4 h'ffffdbc d mb22 [11], [12] msg_data_5 h'ffffdbc e msg_data_6 h'ffffdbcf mb22 [13], [14] msg_data_7 h'ffffdbd0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffdbd1 mb22 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffdbd2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffdbd3 mb22 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffdbd4 -df ? ???????? h'ffffdbe0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffdbe1 mb23 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffdbe2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffdbe3 mb23 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffdbe4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffdbe5 mb23 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] hcan1 (channel 1)
rev. 3.0, 09/04, page 1045 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffdbe6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffdbe7 mb23[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffdbe8 msg_data_0 h'ffffdbe9 mb23 [7], [8] * msg_data_1 h'ffffdbea msg_data_2 h'ffffdbeb mb23 [9], [10] msg_data_3 h'ffffdbe c msg_data_4 h'ffffdbe d mb23 [11], [12] msg_data_5 h'ffffdbee msg_data_6 h'ffffdbef mb23 [13], [14] msg_data_7 h'ffffdbf0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffdbf1 mb23 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffdbf2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffdbf3 mb23 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffdbf4 -ff ? ???????? h'ffffdc00 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffdc01 mb24 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffdc02 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffdc03 mb24 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffdc04 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffdc05 mb24 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffdc06 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffdc07 mb24[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffdc08 msg_data_0 h'ffffdc09 mb24 [7], [8] * msg_data_1 h'ffffdc0a msg_data_2 h'ffffdc0b mb24 [9], [10] msg_data_3 h'ffffdc0c msg_data_4 h'ffffdc0d mb24 [11], [12] msg_data_5 h'ffffdc0e msg_data_6 h'ffffdc0f mb24 [13], [14] msg_data_7 h'ffffdc10 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffdc11 mb24 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] hcan1 (channel 1)
rev. 3.0, 09/04, page 1046 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffdc12 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffdc13 mb24 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] h'ffffdc14 -1f ? ??????? h'ffffdc20 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffdc21 mb25 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffdc22 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffdc23 mb25 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffdc24 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffdc25 mb25 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffdc26 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffdc27 mb25[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffdc28 msg_data_0 h'ffffdc29 mb25 [7], [8] * msg_data_1 h'ffffdc2a msg_data_2 h'ffffdc2b mb25 [9], [10] msg_data_3 h'ffffdc2c msg_data_4 h'ffffdc2d mb25 [11], [12] msg_data_5 h'ffffdc2e msg_data_6 h'ffffdc2f mb25 [13], [14] msg_data_7 h'ffffdc30 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffdc31 mb25 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffdc32 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffdc33 mb25 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] h'ffffdc34 -3f ? ??????? h'ffffdc40 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffdc41 mb26 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffdc42 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffdc43 mb26 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffdc44 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffdc45 mb26 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffdc46 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffdc47 mb26[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffdc48 msg_data_0 h'ffffdc49 mb26 [7], [8] * msg_data_1 hcan1 (channel 1)
rev. 3.0, 09/04, page 1047 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffdc4a msg_data_2 h'ffffdc4b mb26 [9], [10] msg_data_3 h'ffffdc4c msg_data_4 h'ffffdc4d mb26 [11], [12] msg_data_5 h'ffffdc4e msg_data_6 h'ffffdc4f mb26 [13] ,[14] msg_data_7 h'ffffdc50 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffdc51 mb26 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffdc52 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffdc53 mb26 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffdc54 -5f ? ???????? h'ffffdc60 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffdc61 mb27 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffdc62 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffdc63 mb27 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffdc64 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffdc65 mb27 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffdc66 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffdc67 mb27[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffdc68 msg_data_0 h'ffffdc69 mb27 [7], [8] * msg_data_1 h'ffffdc6a msg_data_2 h'ffffdc6b mb27 [9],[10] msg_data_3 h'ffffdc6c msg_data_4 h'ffffdc6d mb27 [11], [12] msg_data_5 h'ffffdc6e msg_data_6 h'ffffdc6f mb27 [13],[14] msg_data_7 h'ffffdc70 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffdc71 mb27 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffdc72 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffdc73 mb27 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffdc74 -7f ? ????????
rev. 3.0, 09/04, page 1048 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffdc80 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffdc81 mb28 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffdc82 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffdc83 mb28 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffdc84 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffdc85 mb28 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffdc86 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffdc87 mb28[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffdc88 msg_data_0 h'ffffdc89 mb28 [7], [8] * msg_data_1 h'ffffdc8a msg_data_2 h'ffffdc8b mb28 [9], [10] msg_data_3 h'ffffdc8c msg_data_4 h'ffffdc8d mb28 [11], [12] msg_data_5 h'ffffdc8e msg_data_6 h'ffffdc8f mb28 [13], [14] msg_data_7 h'ffffdc90 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffdc91 mb28 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffdc92 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffdc93 mb28 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] h'ffffdc94 -7f ? ??????? h'ffffdca0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffdca1 mb29 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffdca2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffdca3 mb29 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffdca4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffdca5 mb29 [4],[5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffdca6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffdca7 mb29[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffdca8 msg_data_0 h'ffffdca9 mb29 [7],[8] * msg_data_1 h'ffffdca a msg_data_2 h'ffffdca b mb29 [9],[10] msg_data_3 h'ffffdca c msg_data_4 h'ffffdca d mb29 [11],[12] msg_data_5 h'ffffdca e msg_data_6 h'ffffdcaf mb29 [13],[14] msg_data_7 hcan1 (channel 1)
rev. 3.0, 09/04, page 1049 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffdcb0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffdcb1 mb29 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffdcb2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffdcb3 mb29 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffdcb4 -bf ? ???????? h'ffffdcc0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffdcc1 mb30 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffdcc2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffdcc3 mb30 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffdcc4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffdcc5 mb30 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] h'ffffdcc6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffdcc7 mb30[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffdcc8 msg_data_0 h'ffffdcc9 mb30 [7], [8] * msg_data_1 h'ffffdcc a msg_data_2 h'ffffdcc b mb30 [9],[10] msg_data_3 h'ffffdcc c msg_data_4 h'ffffdcc d mb30 [11],[12] msg_data_5 h'ffffdcc e msg_data_6 h'ffffdcc f mb30 [13],[14] msg_data_7 h'ffffdcd0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffdcd1 mb30 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffdcd2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffdcd3 mb30 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffdcd4 -df ? ???????? h'ffffdce0 ? stdid[10] stdid[9] stdid[8] stdid[7] stdid[6] stdid[5] stdid[4] h'ffffdce1 mb31 [0], [1] * stdid[3] stdid[2] stdid[1] stdid[0] rtr ide extid[17] extid[16] h'ffffdce2 extid[15] extid[14] extid[13] extid[12] extid[11] extid[10] extid[9] extid[8] h'ffffdce3 mb31 [2], [3] extid[7] extid[6] extid[5] extid[4] extid[3] extid[2] extid[1] extid[0] h'ffffdce4 ccm tte nmc atx dart mbc[2] mbc[1] mbc[0] h'ffffdce5 mb31 [4], [5] ? tct ? cle dlc[3] dlc[2] dlc[1] dlc[0] hcan1 (channel 1)
rev. 3.0, 09/04, page 1050 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffdce6 tmstp [15] tmstp [14] tmstp [13] tmstp [12] tmstp [11] tmstp [10] tmstp [9] tmstp [8] h'ffffdce7 mb31[6] tmstp[7] tmstp[6] tmstp[5] tmstp[4] tmstp[3] tmstp[2] tmstp[1] tmstp[0] h'ffffdce8 msg_data_0 h'ffffdce9 mb31 [7], [8] * msg_data_1 h'ffffdce a msg_data_2 h'ffffdce b mb31 [9], [10] msg_data_3 h'ffffdce c msg_data_4 h'ffffdce d mb31 [11], [12] msg_data_5 h'ffffdce e msg_data_6 h'ffffdcef mb31 [13], [14] msg_data_7 h'ffffdcf0 ? stdid_la fm[10] stdid_la fm[9] stdid_la fm[8] stdid_la fm[7] stdid_la fm[6] stdid_la fm[5] stdid_la fm[4] h'ffffdcf1 mb31 [15], [16] stdid_la fm[3] stdid_la fm[2] stdid_la fm[1] stdid_la fm[0] ? ? extid_la fm[17] extid_la fm[16] h'ffffdcf2 extid_la fm[15] extid_la fm[14] extid_la fm[13] extid_la fm[12] extid_la fm[11] extid_la fm[10] extid_la fm[9] extid_la fm[8] h'ffffdcf3 mb31 [17], [18] extid_la fm[7] extid_la fm[6] extid_la fm[5] extid_la fm[4] extid_la fm[3] extid_la fm[2] extid_la fm[1] extid_la fm[0] hcan1 (channel 1) h'ffffdcf4 -7ff ????????? h'ffffe730 to h'ffffe7ff ?????????? h'ffffe800 fccs fwe ? ? fler ? ? ? sco h'ffffe801 fpcs ? ? ? ? ? ? ? ppvs h'ffffe802 fecs ? ? ? ? ? ? ? epvb h'ffffe803 ? system area (access prohibited) h'ffffe804 fkey k7 k6 k5 k4 k3 k2 k1 k0 h'ffffe805 fmats ms7 ms6 ms5 ms4 ms3 ms2 ms1 ms0 h'ffffe806 ftdar tder tda6 tda5 tda4 tda3 tda2 tda1 tda0 flash h'ffffe807 to h'ffffebff ? system area (access prohibited) h'ffffec00 uba31 uba30 uba29 uba28 uba27 uba26 uba25 uba24 h'ffffec01 ubarh uba23 uba22 uba21 uba20 uba19 uba18 uba17 uba16 h'ffffec02 uba15 uba14 uba13 uba12 uba11 uba10 uba9 uba8 h'ffffec03 ubarl uba7 uba6 uba5 uba4 uba3 uba2 uba1 uba0 h'ffffec04 ubm31 ubm30 ubm29 ubm28 ubm27 ubm26 ubm25 ubm24 h'ffffec05 ubamr h ubm23 ubm22 ubm21 ubm20 ubm19 ubm18 ubm17 ubm16 h'ffffec06 ubm15 ubm14 ubm13 ubm12 ubm11 ubm10 ubm9 ubm8 h'ffffec07 ubamrl ubm7 ubm6 ubm5 ubm4 ubm3 ubm2 ubm1 ubm0 ubc
rev. 3.0, 09/04, page 1051 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffec08 ? ? ? ? ? ? ? ? h'ffffec09 ubbr cp1 cp0 id1 id0 rw1 rw0 sz1 sz0 h'ffffec0a ? ? ? ? ? ? ? ? h'ffffec0b ubcr ? ? ? ? ? cks1 cks0 ubid ubc h'ffffec0c to h'ffffec0f ?????????? h'ffffec10 tcsr * ovf wt/it tme ? ? cks2 cks1 cks0 h'ffffec11 tcnt * h'ffffec12 ? ? ? ? ? ? ? ? ? h'ffffec13 rstcsr * wovf rste rsts ? ? ? ? ? wdt h'ffffec14 sbycr ssby hiz ? ? ? ? ? ? power-down state h'ffffec15 to h'ffffec1f ?????????? h'ffffec20 ? ? ? ? ? ? ? ? h'ffffec21 bcr1 ? ? ? ? a3sz a2sz a1sz a0sz h'ffffec22 iw31 iw30 iw21 iw20 iw11 iw10 iw01 iw00 h'ffffec23 bcr2 cw3 cw2 cw1 cw0 sw3 sw2 sw1 sw0 h'ffffec24 ? w32 w31 w30 ? w22 w21 w20 h'ffffec25 wcr ? w12 w11 w10 ? w02 w01 w00 h'ffffec26 ? ? ? ? ? ? ? ? h'ffffec27 ramer ? ? ? ? rams ram2 ram1 ram0 bsc h'ffffec28 to h'ffffecaf ?????????? note: * this is the read address. the write address is h'fffec10 for tcsr and tcnt, and h'fffec12 for rstcsr. for details, see section 13.2.4, notes on register access.
rev. 3.0, 09/04, page 1052 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffecb0 ? ? ? ? ? ? ? ? h'ffffecb1 dmaor ?????aenmifdme dmac (common) h'ffffecb2 to h'ffffecbf ?????????? h'ffffecc0 h'ffffecc1 h'ffffecc2 h'ffffecc3 sar0 h'ffffecc4 h'ffffecc5 h'ffffecc6 h'ffffecc7 dar0 h'ffffecc8 ? ? ? ? ? ? ? ? h'ffffecc9 h'ffffecca h'ffffeccb dmatcr0 h'ffffeccc ? ? ? di ? ? ? ro h'ffffeccd ? ? ? rs4 rs3 rs2 rs1 rs0 h'ffffecce ? ? sm1 sm0 ? ? dm1 dm0 h'ffffeccf chcr0 ? ? ts1 ts0 tm ie te de dmac (channel 0) h'ffffecd0 h'ffffecd1 h'ffffecd2 h'ffffecd3 sar1 h'ffffecd4 h'ffffecd5 h'ffffecd6 h'ffffecd7 dar1 h'ffffecd8 ? ? ? ? ? ? ? ? h'ffffecd9 h'ffffecda h'ffffecdb dmatcr1 h'ffffecdc ? ? ? di ? ? ? ro h'ffffecdd ? ? ? rs4 rs3 rs2 rs1 rs0 h'ffffecde ? ? sm1 sm0 ? ? dm1 dm0 h'ffffecdf chcr1 ? ? ts1 ts0 tm ie te de dmac (channel 1) h'ffffece0 h'ffffece1 h'ffffece2 h'ffffece3 sar2 dmac (channel 2)
rev. 3.0, 09/04, page 1053 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffece4 h'ffffece5 h'ffffece6 h'ffffece7 dar2 h'ffffece8 ? ? ? ? ? ? ? ? h'ffffece9 h'ffffecea h'ffffeceb dmatcr2 h'ffffecec ? ? ? di ? ? ? ro h'ffffeced ? ? ? rs4 rs3 rs2 rs1 rs0 h'ffffecee ? ? sm1 sm0 ? ? dm1 dm0 h'ffffecef chcr2 ? ? ts1 ts0 tm ie te de dmac (channel 2) h'ffffecf0 h'ffffecf1 h'ffffecf2 h'ffffecf3 sar3 h'ffffecf4 h'ffffecf5 h'ffffecf6 h'ffffecf7 dar3 h'ffffecf8 ? ? ? ? ? ? ? ? h'ffffecf9 h'ffffecfa h'ffffecfb dmatcr3 h'ffffecfc ? ? ? di ? ? ? ro h'ffffecfd ? ? ? rs4 rs3 rs2 rs1 rs0 h'ffffecfe ? ? sm1 sm0 ? ? dm1 dm0 h'ffffecff chcr3 ? ? ts1 ts0 tm ie te de dmac (channel 3) h'ffffed00 h'ffffed01 ipra h'ffffed02 h'ffffed03 iprb h'ffffed04 h'ffffed05 iprc h'ffffed06 h'ffffed07 iprd h'ffffed08 h'ffffed09 ipre h'ffffed0a h'ffffed0b iprf h'ffffed0c h'ffffed0d iprg intc
rev. 3.0, 09/04, page 1054 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'ffffed0e h'ffffed0f iprh h'ffffed10 h'ffffed11 ipri h'ffffed12 h'ffffed13 iprj h'ffffed14 h'ffffed15 iprk h'ffffed16 h'ffffed17 iprl h'ffffed18 nmil ? ? ? ? ? ? nmie h'ffffed19 icr irq0s irq1s irq2s irq3s irq4s irq5s irq6s irq7s h'ffffed1a ? ? ? ? ? ? ? ? h'ffffed1b isr irq0f irq1f irq2f irq3f irq4f irq5f irq6f irq7f intc h'ffffed1c to h'ffffefff ?????????? h'fffff000 smr0 c/a chr pe o/e stop mp cks1 cks0 h'fffff001 brr0 h'fffff002 scr0 tie rie te re mpie teie cke1 cke0 h'fffff003 tdr0 h'fffff004 ssr0 tdre rdrf orer fer per tend mpb mpbt h'fffff005 rdr0 h'fffff006 sdcr0 ? ? ? ? dir ? ? ? h'fffff007 ? ? ? ? ? ? ? ? ? sci (channel 0) h'fffff008 smr1 c/a chr pe o/e stop mp cks1 cks0 h'fffff009 brr1 h'fffff00a scr1 tie rie te re mpie teie cke1 cke0 h'fffff00b tdr1 h'fffff00c ssr1 tdre rdrf orer fer per tend mpb mpbt h'fffff00d rdr1 h'fffff00e sdcr1 ? ? ? ? dir ? ? ? h'fffff00f ? ? ? ? ? ? ? ? ? sci (channel 1) h'fffff010 smr2 c/a chr pe o/e stop mp cks1 cks0 h'fffff011 brr2 h'fffff012 scr2 tie rie te re mpie teie cke1 cke0 h'fffff013 tdr2 h'fffff014 ssr2 tdre rdrf orer fer per tend mpb mpbt h'fffff015 rdr2 h'fffff016 sdcr2 ? ? ? ? dir ? ? ? h'fffff017 ? ? ? ? ? ? ? ? ? sci (channel 2)
rev. 3.0, 09/04, page 1055 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'fffff018 smr3 c/a chr pe o/e stop mp cks1 cks0 h'fffff019 brr3 h'fffff01a scr3 tie rie te re mpie teie cke1 cke0 h'fffff01b tdr3 h'fffff01c ssr3 tdre rdrf orer fer per tend mpb mpbt h'fffff01d rdr3 h'fffff01e sdcr3 ? ? ? ? dir ? ? ? h'fffff01f ? ? ? ? ? ? ? ? ? sci (channel 3) h'fffff020 smr4 c/a chr pe o/e stop mp cks1 cks0 h'fffff021 brr4 h'fffff022 scr4 tie rie te re mpie teie cke1 cke0 h'fffff023 tdr4 h'fffff024 ssr4 tdre rdrf orer fer per tend mpb mpbt h'fffff025 rdr4 h'fffff026 sdcr4 ? ? ? ? dir ? ? ? sci (channel 4) h'fffff027 to h'fffff3ff ?????????? h'fffff400 tstr2 str7d str7c str7b str7a str6d str6c str6b str6a h'fffff401 tstr1 str10 str5 str4 str3 str1b,2b str2a str1a str0 h'fffff402 tstr3 ? ? ? ? ? ? ? str11 h'fffff403 ? ? ? ? ? ? ? ? ? h'fffff404 pscr1 ? ? ? psc1e psc1d psc1c psc1b psc1a h'fffff405 ? ? ? ? ? ? ? ? ? h'fffff406 pscr2 psc2e psc2d psc2c psc2b psc2a h'fffff407 ? ? ? ? ? ? ? ? ? h'fffff408 pscr3 ? ? ? psc3e psc3d psc3c psc3b psc3a h'fffff409 ? ? ? ? ? ? ? ? ? h'fffff40a pscr4 ? ? ? psc4e psc4d psc4c psc4b psc4a h'fffff40b ? ? ? ? ? ? ? ? ? atu-ii (common) h'fffff40c to h'fffff41f ?????????? h'fffff420 h'fffff421 icr0dh h'fffff422 h'fffff423 icr0dl h'fffff424 itvrr1 itva9 itva8 itva7 itva6 itve9 itve8 itve7 itve6 h'fffff425 ? ? ? ? ? ? ? ? ? h'fffff426 itvrr2a itva13a itva12a itva11a itva10a itve13a itve12a itve11a itve10a h'fffff427 ? ? ? ? ? ? ? ? ? h'fffff428 itvrr2b itva13b itva12b itva11b itva10b itve13b itve12b itve11b itve10b h'fffff429 ? ? ? ? ? ? ? ? ? atu-ii (channel 0)
rev. 3.0, 09/04, page 1056 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'fffff42a tior0 io0d1 io0d0 io0c1 io0c0 io0b1 io0b0 io0a1 io0a0 h'fffff42b ? ? ? ? ? ? ? ? ? h'fffff42c ? ? ? ? ? ? ? ? h'fffff42d tsr0 iif2b iif2a iif1 ovf0 icf0d icf0c icf0b icf0a h'fffff42e ? ? ? ? ? ? ? ? h'fffff42f tier0 ? ? ? ove0 ice0d ice0c ice0b ice0a h'fffff430 h'fffff431 tcnt0h h'fffff432 h'fffff433 tcnt0l h'fffff434 h'fffff435 icr0ah h'fffff436 h'fffff437 icr0al h'fffff438 h'fffff439 icr0bh h'fffff43a h'fffff43b icr0bl h'fffff43c h'fffff43d icr0ch h'fffff43e h'fffff43f icr0cl atu-ii (channel 0) h'fffff440 h'fffff441 tcnt1a h'fffff442 h'fffff443 tcnt1b h'fffff444 h'fffff445 gr1a h'fffff446 h'fffff447 gr1b h'fffff448 h'fffff449 gr1c h'fffff44a h'fffff44b gr1d h'fffff44c h'fffff44d gr1e h'fffff44e h'fffff44f gr1f h'fffff450 h'fffff451 gr1g h'fffff452 h'fffff453 gr1h atu-ii (channel 1)
rev. 3.0, 09/04, page 1057 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'fffff454 h'fffff455 ocr1 h'fffff456 h'fffff457 osbr1 h'fffff458 tior1b ? io1d2 io1d1 io1d0 ? io1c2 io1c1 io1c0 h'fffff459 tior1a ? io1b2 io1b1 io1b0 ? io1a2 io1a1 io1a0 h'fffff45a tior1d ? io1h2 io1h1 io1h0 ? io1g2 io1g1 io1g0 h'fffff45b tior1c ? io1f2 io1f1 io1f0 ? io1e2 io1e1 io1e0 h'fffff45c tcr1b ? ? ckegb1 ckegb0 ckselb3 ckselb2 ckselb1 ckselb0 h'fffff45d tcr1a ? ? ckega1 ckega0 cksela3 cksela2 cksela1 cksela0 h'fffff45e ? ? ? ? ? ? ? ovf1a h'fffff45f tsr1a imf1h imf1g imf1f imf1e imf1d imf1c imf1b imf1a h'fffff460 ? ? ? ? ? ? ? ovf1b h'fffff461 tsr1b ???????cmf1 h'fffff462 ? ? ? ? ? ? ? ove1a h'fffff463 tier1a ime1h ime1g ime1f ime1e ime1d ime1c ime1b ime1a h'fffff464 ? ? ? ? ? ? ? ove1b h'fffff465 tier1b ???????cme1 h'fffff466 trgmdr trgmd ? ? ? ? ? ? ? atu-ii (channel 1) h'fffff467 to h'fffff47f ?????????? h'fffff480 ? ovf5 imf5d imf5c imf5b imf5a ovf4 imf4d h'fffff481 tsr3 imf4c imf4b imf4a ovf3 imf3d imf3c imf3b imf3a h'fffff482 ? ove5 ime5d ime5c ime5b ime5a ove4 ime4d h'fffff483 tier3 ime4c ime4b ime4a ove3 ime3d ime3c ime3b ime3a h'fffff484 tmdr ? ? ? ? ? t5pwm t4pwm t3pwm atu-ii (channel 3 to 5) h'fffff485 to h'fffff49f ?????????? h'fffff4a0 h'fffff4a1 tcnt3 h'fffff4a2 h'fffff4a3 gr3a h'fffff4a4 h'fffff4a5 gr3b h'fffff4a6 h'fffff4a7 gr3c h'fffff4a8 h'fffff4a9 gr3d h'fffff4aa tior3b cci3d io3d2 io3d1 io3d0 cci3c io3c2 io3c1 io3c0 h'fffff4ab tior3a cci3b io3b2 io3b1 io3b0 cci3a io3a2 io3a1 io3a0 h'fffff4ac tcr3 ? ? ckeg1 ckeg0 cksel3 cksel2 cksel1 cksel0 atu-ii (channel 3)
rev. 3.0, 09/04, page 1058 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'fffff4ad to h'fffff4bf ?????????? h'fffff4c0 h'fffff4c1 tcnt4 h'fffff4c2 h'fffff4c3 gr4a h'fffff4c4 h'fffff4c5 gr4b h'fffff4c6 h'fffff4c7 gr4c h'fffff4c8 h'fffff4c9 gr4d h'fffff4ca tior4b cci4d io4d2 io4d1 io4d0 cci4c io4c2 io4c1 io4c0 h'fffff4cb tior4a cci4b io4b2 io4b1 io4b0 cci4a io4a2 io4a1 io4a0 h'fffff4cc tcr4 ? ? ckeg1 ckeg0 cksel3 cksel2 cksel1 cksel0 atu-ii (channel 4) h'fffff4cd to h'fffff4df ?????????? h'fffff4e0 h'fffff4e1 tcnt5 h'fffff4e2 h'fffff4e3 gr5a h'fffff4e4 h'fffff4e5 gr5b h'fffff4e6 h'fffff4e7 gr5c h'fffff4e8 h'fffff4e9 gr5d h'fffff4ea tior5b cci5d io5d2 io5d1 io5d0 cci5c io5c2 io5c1 io5c0 h'fffff4eb tior5a cci5b io5b2 io5b1 io5b0 cci5a io5a2 io5a1 io5a0 h'fffff4ec tcr5 ? ? ckeg1 ckeg0 cksel3 cksel2 cksel1 cksel0 atu-ii (channel 5) h'fffff4ed to h'fffff4ef ?????????? h'fffff500 h'fffff501 tcnt6a h'fffff502 h'fffff503 tcnt6b h'fffff504 h'fffff505 tcnt6c h'fffff506 h'fffff507 tcnt6d atu-ii (channel 6)
rev. 3.0, 09/04, page 1059 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'fffff508 h'fffff509 cylr6a h'fffff50a h'fffff50b cylr6b h'fffff50c h'fffff50d cylr6c h'fffff50e h'fffff50f cylr6d h'fffff510 h'fffff511 bfr6a h'fffff512 h'fffff513 bfr6b h'fffff514 h'fffff515 bfr6c h'fffff516 h'fffff517 bfr6d h'fffff518 h'fffff519 dtr6a h'fffff51a h'fffff51b dtr6b h'fffff51c h'fffff51d dtr6c h'fffff51e h'fffff51f dtr6d h'fffff520 tcr6b ? ckseld2 ckseld1 ckseld0 ? ckselc2 ckselc1 ckselc0 h'fffff521 tcr6a ? ckselb2 ckselb1 ckselb0 ? cksela2 cksela1 cksela0 h'fffff522 ? ? ? ? ? ? ? ? h'fffff523 tsr6 ud6d ud6c ud6b ud6a cmf6d cmf6c cmf6b cmf6a h'fffff524 ? ? ? ? ? ? ? ? h'fffff525 tier6 ? ? ? ? cme6d cme6c cme6b cme6a h'fffff526 pmdr dtseld dtselc dtselb dtsela cntseld cntselc cntselb cntsela atu-ii (channel 6) h'fffff527 to h'fffff57f ?????????? h'fffff580 h'fffff581 tcnt7a h'fffff582 h'fffff583 tcnt7b h'fffff584 h'fffff585 tcnt7c h'fffff586 h'fffff587 tcnt7d atu-ii (channel 7)
rev. 3.0, 09/04, page 1060 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'fffff588 h'fffff589 cylr7a h'fffff58a h'fffff58b cylr7b h'fffff58c h'fffff58d cylr7c h'fffff58e h'fffff58f cylr7d h'fffff590 h'fffff591 bfr7a h'fffff592 h'fffff593 bfr7b h'fffff594 h'fffff595 bfr7c h'fffff596 h'fffff597 bfr7d h'fffff598 h'fffff599 dtr7a h'fffff59a h'fffff59b dtr7b h'fffff59c h'fffff59d dtr7c h'fffff59e h'fffff59f dtr7d h'fffff5a0 tcr7b ? ckseld2 ckseld1 ckseld0 ? ckselc2 ckselc1 ckselc0 h'fffff5a1 tcr7a ? ckselb2 ckselb1 ckselb0 ? cksela2 cksela1 cksela0 h'fffff5a2 ? ? ? ? ? ? ? ? h'fffff5a3 tsr7 ud7d ud7c ud7b ud7a cmf7d cmf7c cmf7b cmf7a h'fffff5a4 ? ? ? ? ? ? ? ? h'fffff5a5 tier7 ? ? ? ? cme7d cme7c cme7b cme7a atu-ii (channel 7) h'fffff5a6 to h'fffff5bf ?????????? h'fffff5c0 h'fffff5c1 tcnt11 h'fffff5c2 h'fffff5c3 gr11a h'fffff5c4 h'fffff5c5 gr11b h'fffff5c6 tior11 ? io11b2 io11b1 io11b0 ? io11a2 io11a1 io11a0 h'fffff5c7 ? ? ? ? ? ? ? ? ? atu-ii (channel 11)
rev. 3.0, 09/04, page 1061 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'fffff5c8 tcr11 ? ? ckeg1 ckeg0 ? cksela2 cksela1 cksela0 h'fffff5c9 ? ? ? ? ? ? ? ? ? h'fffff5ca ? ? ? ? ? ? ? ovf11 h'fffff5cb tsr11 ? ? ? ? ? ? imf11b imf11a h'fffff5cc ? ? ? ? ? ? ? ove11 h'fffff5cd tier11 ??????ime11bime11a atu-ii (channel 11) h'fffff5ce to h'fffff5ff ?????????? h'fffff600 h'fffff601 tcnt2a h'fffff602 h'fffff603 tcnt2b h'fffff604 h'fffff605 gr2a h'fffff606 h'fffff607 gr2b h'fffff608 h'fffff609 gr2c h'fffff60a h'fffff60b gr2d h'fffff60c h'fffff60d gr2e h'fffff60e h'fffff60f gr2f h'fffff610 h'fffff611 gr2g h'fffff612 h'fffff613 gr2h h'fffff614 h'fffff615 ocr2a h'fffff616 h'fffff617 ocr2b h'fffff618 h'fffff619 ocr2c h'fffff61a h'fffff61b ocr2d h'fffff61c h'fffff61d ocr2e h'fffff61e h'fffff61f ocr2f atu-ii (channel 2)
rev. 3.0, 09/04, page 1062 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'fffff620 h'fffff621 ocr2g h'fffff622 h'fffff623 ocr2h h'fffff624 h'fffff625 osbr2 h'fffff626 tior2b ? io2d2 io2d1 io2d0 ? io2c2 io2c1 io2c0 h'fffff627 tior2a ? io2b2 io2b1 io2b0 ? io2a2 io2a1 io2a0 h'fffff628 tior2d ? io2h2 io2h1 io2h0 ? io2g2 io2g1 io2g0 h'fffff629 tior2c ? io2f2 io2f1 io2f0 ? io2e2 io2e1 io2e0 h'fffff62a tcr2b ? ? ckegb1 ckegb0 ckselb3 ckselb2 ckselb1 ckselb0 h'fffff62b tcr2a ? ? ckega1 ckega0 cksela3 cksela2 cksela1 cksela0 h'fffff62c ? ? ? ? ? ? ? ovf2a h'fffff62d tsr2a imf2h imf2g imf2f imf2e imf2d imf2c imf2b imf2a h'fffff62e ? ? ? ? ? ? ? ovf2b h'fffff62f tsr2b cmf2h cmf2g cmf2f cmf2e cmf2d cmf2c cmf2b cmf2a h'fffff630 ? ? ? ? ? ? ? ove2a h'fffff631 tier2a ime2h ime2g ime2f ime2e ime2d ime2c ime2b ime2a h'fffff632 ? ? ? ? ? ? ? ove2b h'fffff633 tier2b cme2h cme2g cme2f cme2e cme2d cme2c cme2b cme2a atu-ii (channel 2) h'fffff634 to h'fffff63f ?????????? h'fffff640 h'fffff641 dcnt8a h'fffff642 h'fffff643 dnct8b h'fffff644 h'fffff645 dnct8c h'fffff646 h'fffff647 dcnt8d h'fffff648 h'fffff649 dcnt8e h'fffff64a h'fffff64b dcnt8f h'fffff64c h'fffff64d dcnt8g h'fffff64e h'fffff64f dcnt8h h'fffff650 h'fffff651 dcnt8i atu-ii (channel 8)
rev. 3.0, 09/04, page 1063 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'fffff652 h'fffff653 dcnt8j h'fffff654 h'fffff655 dcnt8k h'fffff656 h'fffff657 dcnt8l h'fffff658 h'fffff659 dcnt8m h'fffff65a h'fffff65b dcnt8n h'fffff65c h'fffff65d dcnt8o h'fffff65e h'fffff65f dcnt8p h'fffff660 h'fffff661 rldr8 h'fffff662 cn8p cn8o cn8n cn8m cn8l cn8k cn8j cn8i h'fffff663 tcnr cn8h cn8g cn8f cn8e cn8d cn8c cn8b cn8a h'fffff664 otep oteo oten otem otel otek otej otei h'fffff665 otr oteh oteg otef otee oted otec oteb otea h'fffff666 dst8p dst8o dst8n dst8m dst8l dst8k dst8j dst8i h'fffff667 dstr dst8h dst8g dst8f dst8e dst8d dst8c dst8b dst8a h'fffff668 tcr8 ? ckselb2 ckselb1 ckselb0 ? cksela2 cksela1 cksela0 h'fffff669 ? ? ? ? ? ? ? ? ? h'fffff66a osf8p osf8o osf8n osf8m osf8l osf8k osf8j osf8i h'fffff66b tsr8 osf8h osf8g osf8f osf8e osf8d osf8c osf8b osf8a h'fffff66c ose8p ose8o ose8n ose8m ose8l ose8k ose8j ose8i h'fffff66d tier8 ose8h ose8g ose8f ose8e ose8d ose8c ose8b ose8a h'fffff66e rldenr rlden ? ? ? ? ? ? ? atu-ii (channel 8) h'fffff66f to h'fffff67f ?????????? h'fffff680 ecnt9a h'fffff681 ? ? ? ? ? ? ? ? ? h'fffff682 ecnt9b h'fffff683 ? ? ? ? ? ? ? ? ? h'fffff684 ecnt9c h'fffff685 ? ? ? ? ? ? ? ? ? h'fffff686 ecnt9d h'fffff687 ? ? ? ? ? ? ? ? ? h'fffff688 ecnt9e h'fffff689 ? ? ? ? ? ? ? ? ? atu-ii (channel 9)
rev. 3.0, 09/04, page 1064 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'fffff68a ecnt9f h'fffff68b ? ? ? ? ? ? ? ? ? h'fffff68c gr9a h'fffff68d ? ? ? ? ? ? ? ? ? h'fffff68e gr9b h'fffff68f ? ? ? ? ? ? ? ? ? h'fffff690 gr9c h'fffff691 ? ? ? ? ? ? ? ? ? h'fffff692 gr9d h'fffff693 ? ? ? ? ? ? ? ? ? h'fffff694 gr9e h'fffff695 ? ? ? ? ? ? ? ? ? h'fffff696 gr9f h'fffff697 ? ? ? ? ? ? ? ? ? h'fffff698 tcr9a ? trg3ben egselb1 egselb0 ? trg3aen egsela1 egsela0 h'fffff699 ? ? ? ? ? ? ? ? ? h'fffff69a tcr9b ? trg3den egseld1 egseld0 ? trg3cen egselc1 egselc0 h'fffff69b ? ? ? ? ? ? ? ? ? h'fffff69c tcr9c ? ? egself1 egself0 ? ? egsele1 egsele0 h'fffff69d ? ? ? ? ? ? ? ? ? h'fffff69e ? ? ? ? ? ? ? ? h'fffff69f tsr9 ? ? cmf9f cmf9e cmf9d cmf9c cmf9b cmf9a h'fffff6a0 ? ? ? ? ? ? ? ? h'fffff6a1 tier9 ? ? cme9f cme9e cme9d cme9c cme9b cme9a atu-ii (channel 9) h'fffff6a2 to h'fffff6bf ?????????? h'fffff6c0 h'fffff6c1 tcnt10a h h'fffff6c2 h'fffff6c3 tcnt10a l h'fffff6c4 tcnt10b h'fffff6c5 ? ? ? ? ? ? ? ? ? h'fffff6c6 h'fffff6c7 tcnt10c h'fffff6c8 tcnt10d h'fffff6c9 ? ? ? ? ? ? ? ? ? h'fffff6ca h'fffff6cb tcnt10e h'fffff6cc h'fffff6cd tcnt10f atu-ii (channel 10)
rev. 3.0, 09/04, page 1065 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'fffff6ce h'fffff6cf tcnt10g h'fffff6d0 h'fffff6d1 icr10ah h'fffff6d2 h'fffff6d3 icr10al h'fffff6d4 h'fffff6d5 ocr10ah h'fffff6d6 h'fffff6d7 ocr10al h'fffff6d8 ocr10b h'fffff6d9 ? ? ? ? ? ? ? ? ? h'fffff6da h'fffff6db rld10c h'fffff6dc h'fffff6dd gr10g h'fffff6de tcnt10h h'fffff6df ? ? ? ? ? ? ? ? ? h'fffff6e0 ncr10 atu-ii (channel 10) h'fffff6e1 ? ? ? ? ? ? ? ? ? h'fffff6e2 tior10 rlden ccs pim1 pim0 ? io10g2 io10g1 io10g0 h'fffff6e3 ? ? ? ? ? ? ? ? ? h'fffff6e4 tcr10 trg2ben trg1ben trg2aen trg1aen trg0den nce ckeg1 ckeg0 h'fffff6e5 ? ? ? ? ? ? ? ? ? h'fffff6e6 h'fffff6e7 tcclr10 h'fffff6e8 ? ? ? ? ? ? ? ? h'fffff6e9 tsr10 ? ? ? ? cmf10g cmf10b icf10a cmf10a h'fffff6ea ? ? ? ? ? ? ? ? h'fffff6eb tier10 ? ? ? ireg cme10g cme10b ice10a cme10a atu-ii (channel 10) h'fffff6ec to h'fffff6ff ?????????? h'fffff700 puls7ro e puls6ro e puls5ro e puls4ro e puls3ro e puls2ro e puls1ro e puls0ro e h'fffff701 popcr puls7so e puls6so e puls5so e puls4so e puls3so e puls2so e puls1so e puls0so e apc h'fffff702 to h'fffff707 ?????????? h'fffff708 syscr1 oscstop inosce ? ? ? ? audsrst rame h'fffff709 ? ? ? ? ? ? ? ? ? h'fffff70a sycsr2 * 1 ???????? h'fffff70b sycsr2 * 2 cksel ? ? ? mstop3 mstop2 mstop1 mstop0 power-down state
rev. 3.0, 09/04, page 1066 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'fffff70c to h'fffff70f ?????????? h'fffff710 ? ? ? ? ? ? ? ? h'fffff711 cmstr ??????str1str0 h'fffff712 ? ? ? ? ? ? ? ? h'fffff713 cmcsr0 cmf cmie ? ? ? ? cks1 cks0 h'fffff714 cmcnt0 cmt notes: * this is the read address. the write address is h'fffff70a. for details, see section 25.2.4, notes on register access. 1. program in the word unit. programming in the byte or longword unit is not enabled. 2. read in the byte unit. correct values cannot be read in the word or longword unit.
rev. 3.0, 09/04, page 1067 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'fffff715 cmcnt0 h'fffff716 h'fffff717 cmcor0 h'fffff718 ? ? ? ? ? ? ? ? h'fffff719 cmcsr1 cmf cmie ? ? ? ? cks1 cks0 h'fffff71a h'fffff71b cmcnt1 h'fffff71c h'fffff71d cmcor1 h'fffff71e ? ? ? ? ? ? ? ? ? h'fffff71f ? ? ? ? ? ? ? ? ? cmt h'fffff720 pa15ior pa14ior pa13ior pa12ior pa11ior pa10ior pa9ior pa8ior h'fffff721 paior pa7ior pa6ior pa5ior pa4ior pa3ior pa2ior pa1ior pa0ior h'fffff722 ? pa15md ? pa14md ? pa13md ? pa12md h'fffff723 pacrh pa11md1 pa11md0 pa10md1 pa10md0 pa10md1 pa9md0 pa8md1 pa8md0 h'fffff724 ? pa7md ? pa6md ? pa5md ? pa4md h'fffff725 pacrl ? pa3md ? pa2md ? pa1md ? pa0md h'fffff726 pa15dr pa14dr pa13dr pa12dr pa11dr pa10dr pa9dr pa8dr h'fffff727 padr pa7dr pa6dr pa5dr pa4dr pa3dr pa2dr pa1dr pa0dr port a h'fffff728 ph15ior ph14ior ph13ior ph12ior ph11ior ph10ior ph9ior ph8ior h'fffff729 phior ph7ior ph6ior ph5ior ph4ior ph3ior ph2ior ph1ior ph0ior h'fffff72a ph15md ph14md ph13md ph12md ph11md ph10md ph9md ph8md h'fffff72b phcr ph7md ph6md ph5md ph4md ph3md ph2md ph1md ph0md h'fffff72c ph15dr ph14dr ph13dr ph12dr ph11dr ph10dr ph9dr ph8dr h'fffff72d phdr ph7dr ph6dr ph5dr ph4dr ph3dr ph2dr ph1dr ph0dr port h h'fffff72e adtrgr1 extrg ? ? ? ? ? ? ? h'fffff72f adtrgr2 extrg ? ? ? ? ? ? ? a/d h'fffff730 pb15ior pb14ior pb13ior pb12ior pb11ior pb10ior pb9ior pb8ior h'fffff731 pbior pb7ior pb6ior pb5ior pb4ior pb3ior pb2ior pb1ior pb0ior h'fffff732 pb15md1 pb15md0 pb14md1 pb14md0 ? pb13md pb12md1 pb12md0 h'fffff733 pbcrh pb11md1 pb11md0 pb10md1 pb10md0 pb9md1 pb9md0 pb8md1 pb8md0 h'fffff734 pb7md1 pb7md0 pb6md1 pb6md0 pb5md1 pb5md0 pb4md1 pb4md0 h'fffff735 pbcrl ? pb3md ? pb2md ? pb1md ? pb0md h'fffff736 pb15ir pb14ir pb13ir ? pb11ir pb10ir pb9ir pb8ir h'fffff737 pbir pb7ir pb6ir pb5ir pb4ir pb3ir pb2ir pb1ir pb0ir h'fffff738 pb15dr pb14dr pb13dr pb12dr pb11dr pb10dr pb9dr pb8dr h'fffff739 pbdr pb7dr pb6dr pb5dr pb4dr pb3dr pb2dr pb1dr pb0dr port b h'fffff73a ? ? ? ? ? ? ? ? h'fffff73b pcior ? ? ? pc4ior pc3ior pc2ior pc1ior pc0ior h'fffff73c ? ? ? ? ? ? ? pc4md h'fffff73d pccr ? pc3md ? pc2md ? pc1md ? pc0md port c
rev. 3.0, 09/04, page 1068 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'fffff73e ? ? ? ? ? ? ? ? h'fffff73f pcdr ? ? ? pc4dr pc3dr pc2dr pc1dr pc0dr port c h'fffff740 ? ? pd13ior pd12ior pd11ior pd10ior pd9ior pd8ior h'fffff741 pdior pd7ior pd6ior pd5ior pd4ior pd3ior pd2ior pd1ior pd0ior h'fffff742 ? ? ? ? pd13md1 pd13md0 ? pd12md h'fffff743 pdcrh ? pd11md ? pd10md ? pd9md ? pd8md h'fffff744 ? pd7md ? pd6md ? pd5md ? pd4md h'fffff745 pdcrl ? pd3md ? pd2md ? pd1md ? pd0md h'fffff746 ? ? pd13dr pd12dr pd11dr pd10dr pd9dr pd8dr h'fffff747 pddr pd7dr pd6dr pd5dr pd4dr pd3dr pd2dr pd1dr pd0dr port d h'fffff748 pf15ior pf14ior pf13ior pf12ior pf11ior pf10ior pf9ior pf8ior h'fffff749 pfior pf7ior pf6ior pf5ior pf4ior pf3ior pf2ior pf1ior pf0ior h'fffff74a ckhiz pf15md ? pf14md ? pf13md ? pf12md h'fffff74b pfcrh ? pf11md ? pf10md ? pf9md ? pf8md h'fffff74c ? pf7md ? pf6md pf5md1 pf5md0 ? pf4md h'fffff74d pfcrl ? pf3md ? pf2md ? pf1md ? pf0md h'fffff74e pf15dr pf14dr pf13dr pf12dr pf11dr pf10dr pf9dr pf8dr h'fffff74f pfdr pf7dr pf6dr pf5dr pf4dr pf3dr pf2dr pf1dr pf0dr port f h'fffff750 pe15ior pe14ior pe13ior pe12ior pe11ior pe10ior pe9ior pe8ior h'fffff751 peior pe7ior pe6ior pe5ior pe4ior pe3ior pe2ior pe1ior pe0ior h'fffff752 pe15md pe14md pe13md pe12md pe11md pe10md pe9md pe8md h'fffff753 pecr pe7md pe6md pe5md pe4md pe3md pe2md pe1md pe0md h'fffff754 pe15dr pe14dr pe13dr pe12dr pe11dr pe10dr pe9dr pe8dr h'fffff755 pedr pe7dr pe6dr pe5dr pe4dr pe3dr pe2dr pe1dr pe0dr port e h'fffff756 ? ? pl13ior pl12ior pl11ior pl10ior pl9ior pl8ior h'fffff757 plior pl7ior pl6ior pl5ior pl4ior pl3ior pl2ior pl1ior pl0ior h'fffff758 ? ? ? ? pl13md1 pl13md0 ? pl12md h'fffff759 plcrh pl11md1 pl11md0 pl10md1 pl10md0 pl9md1 pl9md0 ? pl8md h'fffff75a ? pl7md ? pl6md ? pl5md ? pl4md h'fffff75b plcrl ? pl3md pl2md1 pl2md0 pl1md1 pl1md0 ? pl0md0 h'fffff75c ? ? ? ? ? ? pl9ir pl8ir h'fffff75d plir pl7ir??????? h'fffff75e ? ? pl13dr pl12dr pl11dr pl10dr pl9dr pl8dr h'fffff75f pldr pl7dr pl6dr pl5dr pl4dr pl3dr pl2dr pl1dr pl0dr port l h'fffff760 ? ? ? ? ? ? ? ? h'fffff761 pgior ? ? ? ? pg3ior pg2ior pg1ior pg0ior h'fffff762 ? ? ? ? ? ? ? ? h'fffff763 pgcr pg3md1 pg3md0 pg2md1 pg2md0 ? pg1md pg0md1 pg0md0 h'fffff764 ? ? ? ? ? ? ? ? h'fffff765 pgdr ????pg3drpg2drpg1drpg0dr port g
rev. 3.0, 09/04, page 1069 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'fffff766 pj15ior pj14ior pj13ior pj12ior pj11ior pj10ior pj9ior pj8ior h'fffff767 pjior pj7ior pj6ior pj5ior pj4ior pj3ior pj2ior pj1ior pj0ior h'fffff768 ? pj15md ? pj14md ? pj13md ? pj12md h'fffff769 pjcrh ? pj11md ? pj10md ? pj9md ? pj8md h'fffff76a ? pj7md ? pj6md ? pj5md ? pj4md h'fffff76b pjcrl ? pj3md ? pj2md ? pj1md ? pj0md h'fffff76c pj15dr pj14dr pj13dr pj12dr pj11dr pj10dr pj9dr pj8dr h'fffff76d pjdr pj7dr pj6dr pj5dr pj4dr pj3dr pj2dr pj1dr pj0dr port j h'fffff76e adtrg0 extrg ? ? ? ? ? ? ? h'fffff76f ? ? ? ? ? ? ? ? ? a/d h'fffff770 pk15ior pk14ior pk13ior pk12ior pk11ior pk10ior pk9ior pk8ior h'fffff771 pkior pk7ior pk6ior pk5ior pk4ior pk3ior pk2ior pk1ior pk0ior h'fffff772 ? pk15md ? pk14md ? pk13md ? pk12md h'fffff773 pkcrh ? pk11md ? pk10md ? pk9md ? pk8md h'fffff774 ? pk7md ? pk6md ? pk5md ? pk4md h'fffff775 pkcrl ? pk3md ? pk2md ? pk1md ? pk0md h'fffff776 pk15ir pk14ir pk13ir pk12ir pk11ir pk10ir pk9ir pk8ir h'fffff777 pkir pk7ir pk6ir pk5ir pk4ir pk3ir pk2ir pk1ir pk0ir h'fffff778 pk15dr pk14dr pk13dr pk12dr pk11dr pk10dr pk9dr pk8dr h'fffff779 pkdr pk7dr pk6dr pk5dr pk4dr pk3dr pk2dr pk1dr pk0dr port k h'fffff77a to h'fffff77f ? ????????? h'fffff780 pa15pr pa14pr pa13pr pa12pr pa11pr pa10pr pa9pr pa8pr h'fffff781 papr pa7pr pa6pr pa5pr pa4pr pa3pr pa2pr pa1pr pa0pr port a h'fffff782 pb15pr pb14pr pb13pr pb12pr pb11pr pb10pr pb9pr pb8pr h'fffff783 pbpr pb7pr pb6pr pb5pr pb4pr pb3pr pb2pr pb1pr pb0pr port b h'fffff784 pd15pr pd14pr pd13pr pd12pr pd11pr pd10pr pd9pr pd8pr h'fffff785 pdpr pd7pr pd6pr pd5pr pd4pr pd3pr pd2pr pd1pr pd0pr port d h'fffff786 pj15pr pj14pr pj13pr pj12pr pj11pr pj10pr pj9pr pj8pr h'fffff787 pjpr pj7pr pj6pr pj5pr pj4pr pj3pr pj2pr pj1pr pj0pr port j h'fffff788 pl15pr pl14pr pl13pr pl12pr pl11pr pl10pr pl9pr pl8pr h'fffff789 plpr pl7pr pl6pr pl5pr pl4pr pl3pr pl2pr pl1pr pl0pr port l h'fffff78a to h'fffff7bf ? ?????????
rev. 3.0, 09/04, page 1070 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'fffff7c0 ts3 ts2 ts1 ts0 ? ? ? ? h'fffff7c1 sdir ???????? h'fffff7c2 ? ? ? ? ? ? ? ? h'fffff7c3 sdsr ???????sdtrf h'fffff7c4 h'fffff7c5 sddrh h'fffff7c6 h'fffff7c7 sddrl h-udi h'fffff7c8 to h'fffff7ff ? ????????? h'fffff800 addr0h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff801 addr0l ad1 ad0 ? ? ? ? ? ? h'fffff802 addr1h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff803 addr1l ad1 ad0 ? ? ? ? ? ? h'fffff804 addr2h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff805 addr2l ad1 ad0 ? ? ? ? ? ? h'fffff806 addr3h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff807 addr3l ad1 ad0 ? ? ? ? ? ? h'fffff808 addr4h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff809 addr4l ad1 ad0 ? ? ? ? ? ? h'fffff80a addr5h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff80b addr5l ad1 ad0 ? ? ? ? ? ? h'fffff80c addr6h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff80d addr6l ad1 ad0 ? ? ? ? ? ? h'fffff80e addr7h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff80f addr7l ad1 ad0 ? ? ? ? ? ? h'fffff810 addr8h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff811 addr8l ad1 ad0 ? ? ? ? ? ? h'fffff812 addr9h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff813 addr9l ad1 ad0 ? ? ? ? ? ? h'fffff814 addr10h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff815 addr10l ad1 ad0 ? ? ? ? ? ? h'fffff816 addr11h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff817 addr11l ad1 ad0 ? ? ? ? ? ? h'fffff818 adcsr0 adf adie adm1 adm0 ch3 ch2 ch1 ch0 h'fffff819 adcr0 trge cks adst adcs ? ? ? ? h'fffff81a to h'fffff81f ? ???????? h'fffff820 addr12h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff821 addr12l ad1 ad0 ? ? ? ? ? ? a/d
rev. 3.0, 09/04, page 1071 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'fffff822 addr13h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff823 addr13l ad1 ad0 ? ? ? ? ? ? h'fffff824 addr14h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff825 addr14l ad1 ad0 ? ? ? ? ? ? h'fffff826 addr15h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff827 addr15l ad1 ad0 ? ? ? ? ? ? h'fffff828 addr16h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff829 addr16l ad1 ad0 ? ? ? ? ? ? h'fffff82a addr17h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff82b addr17l ad1 ad0 ? ? ? ? ? ? h'fffff82c addr18h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff82d addr18l ad1 ad0 ? ? ? ? ? ? h'fffff82e addr19h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff82f addr19l ad1 ad0 ? ? ? ? ? ? h'fffff830 addr20h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff831 addr20l ad1 ad0 ? ? ? ? ? ? h'fffff832 addr21h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff833 addr21l ad1 ad0 ? ? ? ? ? ? h'fffff834 addr22h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff835 addr22l ad1 ad0 ? ? ? ? ? ? h'fffff836 addr23h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff837 addr23l ad1 ad0 ? ? ? ? ? ? h'fffff838 adcsr1 adf adie adm1 adm0 ch3 ch2 ch1 ch0 h'fffff839 adcr1 trge cks adst adcs ? ? ? ? h'fffff83a to h'fffff83f ? ???????? h'fffff840 addr24h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff841 addr24l ad1 ad0 ? ? ? ? ? ? h'fffff842 addr25h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff843 addr25l ad1 ad0 ? ? ? ? ? ? h'fffff844 addr26h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff845 addr26l ad1 ad0 ? ? ? ? ? ? h'fffff846 addr27h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff847 addr27l ad1 ad0 ? ? ? ? ? ? h'fffff848 addr28h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff849 addr28l ad1 ad0 ? ? ? ? ? ? h'fffff84a addr29h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff84b addr29l ad1 ad0 ? ? ? ? ? ? h'fffff84c addr30h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 h'fffff84d addr30l ad1 ad0 ? ? ? ? ? ? h'fffff84e addr31h ad9 ad8 ad7 ad6 ad5 adr ad3 ad2 a/d
rev. 3.0, 09/04, page 1072 of 1086 bit names register name abbrevi- ation bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 module h'fffff84f addr31l ad1 ad0 ? ? ? ? ? ? h'fffff850 to h'fffff857 ? ???????? h'fffff858 adcsr2 adf adie adm1 adm0 ? ch2 ch1 ch0 h'fffff859 adcr2 trge cks adst adcs ? ? ? ? a/d h'fffff85a to h'fffff85f ? ????????? h'fffff860 h'fffff861 adcnt0 h'fffff862 h'fffff863 adcylr0 h'fffff864 h'fffff865 addr0a h'fffff866 h'fffff867 addr0b h'fffff868 h'fffff869 adgr0a h'fffff86a h'fffff86b adgr0b h'fffff86c adtcr0 cksel1x cksel0x ? ? dtselxb dtselxa adselxb adselxa h'fffff86d adtsr0 ? tadfxb tadfxa addfxb addfxa adcylfx adcmfxb adcmfxa h'fffff86e adtier0 adtrgx tadexb tadexa addexb addexa adcylex adcmexb adcnexa h'fffff86f h'fffff870 h'fffff871 adcnt1 h'fffff872 h'fffff873 adcylr1 h'fffff874 h'fffff875 addr1a h'fffff876 h'fffff877 addr1b h'fffff878 h'fffff879 adgr1a h'fffff87a h'fffff87b adgr1b h'fffff87c adtcr1 cksel1x cksel0x ? ? dtselxb dtselxa adselxb adselxa h'fffff87d adtsr1 ? tadfxb tadfxa addfxb addfxa adcylfx adcmfxb adcmfxa h'fffff87e adtier1 adtrgx tadexb tadexa addexb addexa adcylex adcmexb adcnexa h'fffff87f mtad
rev. 3.0, 09/04, page 1073 of 1086 a.2 register states in reset and power-down states table a.2 register states in reset and power-down states reset state power-down state type name power-on hardware standby software standby sleep r0 to r15 sr gbr vbr mach, macl pr cpu pc initialized initialized held held fr0 to fr15 fpul fpu fpscr initialized initialized held held ipra to iprl icr interrupt controller (intc) isr initialized initialized held held ubarh, ubarl ubamrh, ubamrl ubbr user break controller (ubc) ubcr initialized initialized held held bcr1, bcr2 bus state controller (bsc) wcr initialized initialized held held sar0 to sar3 dar0 to dar3 dmatcr0 to dmatcr3 undefined undefined undefined chcr0 to chcr3 direct memory access controller (dmac) dmaor initialized initialized initialized held bfr6a-d, bfr7a-d cylr6a-d, cylr7a-d dcnt8a-p advanced timer unit-ii (atu-ii) dstr initialized initialized initialized held
rev. 3.0, 09/04, page 1074 of 1086 table a.2 register states in reset and power-down states (cont) reset state power-down state type name power-on hardware standby software standby sleep dtr6a-d, dtr7a-d ecnt9a-f gr1a-h, gr2a-h gr3a-d, gr4a-d gr5a-d, gr9a-f gr10g, gr11a, 11b icr0a-d, icr10a itvrr1, itvrr2a, 2b ncr10 ocr1, ocr2a-h ocr10ah, 10al ocr10b osbr1, osbr2 otr pmdr pscr1-4 pstr rld10c rldenr rldr8 tcclr10 tcnr tcnt0h, l, tcnt1a, 1b, tcnt2a, 2b tcnt3-5, tcnt6a-d tcnt7a-d tcnt10ah, 10al tcnt10b-h, tcnt11 advanced timer unit-ii (atu-ii) tcr1a, 1b tcr2a, 2b, tcr3-5 tcr6a, 6b, tcr7a, 7b, tcr8, tcr9a-c tcr10, tcr11 initialized initialized initialized held
rev. 3.0, 09/04, page 1075 of 1086 table a.2 register states in reset and power-down states (cont) reset state power-down state type name power-on hardware standby software standby sleep tier0, tier1a, 1b tier2a, 2b, tier3 tier6-11 tior0, tior1a-d tior2a-d, tior3a, 3b, tior4a, 4b tior5a, 5b tior10,11 tmdr tnct10e trgmdr tsr0, tsr1a, 1b tsr2a, 2b, tsr3 tsr6-11 advanced timer unit-ii (atu-ii) tstr1-3 initialized initialized initialized held advanced pulse controller (apc) popcr initialized initialized held held tcnt tcsr watchdog timer (wdt) rstcsr initialized initialized initialized held smr0 to smr4 brr0 to brr4 scr0 to scr4 held tdr0 to tdr4 ssr0 to ssr4 rdr0 to rdr4 intialized serial communication interface (sci) sdcr0 to sdcr4 initialized initialized held held addr0 (h/l) to addr31 (h/l) adscr0, adcsr1 adcsr2 a/d converter adcr0, adcr1 adcr2 initialized initialized initialized held
rev. 3.0, 09/04, page 1076 of 1086 table a.2 register states in reset and power-down states (cont) reset state power-down state type name power-on hardware standby software standby sleep a/d converter adtrgr0, adtrgr1 adtrgr2 initialized initialized held held cmstr cmcsr0, cmcsr1 initialized initialized initialized held cmcnt0, cmcnt1 compare match timer (cmt) cmcor0, cmcor1 initialized initialized initialized held paior, pbior pcior, pdior peior, pfior pgior, phior pjior, pkior, plior pin function controller (pfc) pacrh, pacrl pbcrh, pbcrl pbir, pccr, pdcrh pdcrl, pecr pfcrh, pfcrl pgcr, phcr, pjcrh pjcrl, pkcrh pkcrl, pkir, plcrh plcrl,plir initialized initialized held held i/o ports padr, pbdr, pcdr pddr, pedr, pfdr pgde, phdr, pjdr pkdr, pldr initialized initialized held held ramer held fccs initialized/ held * fpcs fecs fkey initialized fmats held flash rom ftdar initialized initialized initialized held
rev. 3.0, 09/04, page 1077 of 1086 table a.2 register states in reset and power-down states (cont) reset state power-down state type name power-on hardware standby software standby sleep sbycr syscr1, syscr2 power-down state related mstcr initialized initialized held held mcr gsr hcan_bcr 0/1 irp imr txpr 0/1 txcr 0/1 txack 0/1 aback 0/1 rxpr 0/1 rfpr 0/1 mbimr 0/1 umsr 0/1 tcntr tcr tsr tmr tdcr losr ccr cmax icr 0/1 tcmr 0-2 initialized initialized initialized held controller area network (hcan) mb undefined held held held sdir sdsr high-performance user debug interface (h-udi) sddrh, sddrl held held held held note: * bit 7 (fler) is held, and bit 0 (sco) is initialized.
rev. 3.0, 09/04, page 1078 of 1086
rev. 3.0, 09/04, page 1079 of 1086 appendix b pin states tables b.1, b.2, and b.3 show the sh7058 pin states. table b.1 pin states pin state reset state power-down state power-on type pin name romless expanded mode 8 bits 16 bits expanded mode with rom single- chip mode hardware standby software standby h-udi module standby aud module standby bus- released state ck * 2 ozh * 1 ooo xtal o l l o o o extal i z i i i i clock pllcap i iiiii res i ziiii fwe i iiiii hstby i iiiii md0 i iiiii md1 i iiiii md2 i iiiii wdtovf ozo * 1 ooo breq ? zzi i i system control back ? zzool nmi i z i i i i irq0 to irq7 ? zzi i i interrupt irqout ?zo * 1 ooo address bus a0 to a21 o ? z z o o z d0 to d7 z ? z z i/o i/o z data bus d8 to d15 ? z ? z z i/o i/o z wait i ?zzi i i wrh , wrl h ?zzooz rd h ?zzooz cs0 h ?zzooz bus control cs1 to cs3 ? zzooz port pod ? zzi i i ti0a to ti0d ? z z i i i tio1a to tio1h ? z k * 1 i/o i/o i/o tio2a to tio2h ? z k * 1 i/o i/o i/o atu-ii tio3a to tio3d ? z k * 1 i/o i/o i/o
rev. 3.0, 09/04, page 1080 of 1086 table b.1 pin states (cont) pin state reset state power-down state power-on type pin name romless expanded mode 8 bits 16 bits expanded mode with rom single- chip mode hardware standby software standby h-udi module standby aud module standby bus- released state tio4a to tio4d ? z k * 1 i/o i/o i/o tio5a to tio5d ? z k * 1 i/o i/o i/o to6a to to6d ? z o * 1 ooo to7a to to7d ? z o * 1 ooo to8a to to8p ? z o * 1 ooo ti9a to ti9f ? z z i i i ti10 ? zzi i i tio11a, tio11b ? z k * 1 i/o i/o i/o atu-ii tclka, tclkb ? z z i i i sck0 to sck4 ? z k * 1 i/o i/o i/o txd0 to txd4 ? z o * 1 ooo sci rxd0 to rxd4 ? z z i i i an0 to an31 z z z i i i adtrg0 , adtrg1 ? zzi i i adend ? z o * 1 ooo a/d converter avref i iiiii apc puls0 to puls7 ? z o * 1 ooo htxd0, htxd1 ? z o * 1 ooo hcan hrxd0, hrxd1 ? z z i i i ubc ubctrg ?zo * 1 ooo pa0 to pa15 z z k * 1 i/o i/o i/o pb0 to pb15 z z k * 1 i/o i/o i/o pc0 to pc4 z z k * 1 i/o i/o i/o pd0 to pd13 z z k * 1 i/o i/o i/o pe0 to pe15 ? z z k * 1 i/o i/o i/o pf0 to pf5 ? z z k * 1 i/o i/o i/o pf6 to pf10 ? z z k * 1 i/o i/o i/o ph11 to pf15 z z k * 1 i/o i/o i/o pg0 to pg3 z z k * 1 i/o i/o i/o ph0 to ph7 ? z z k * 1 i/o i/o i/o ph8 to ph15 z ? z z k * 1 i/o i/o i/o pj0 to pj15 z z k * 1 i/o i/o i/o pk0 to pk15 z z k * 1 i/o i/o i/o i/o port pl0 to pl13 z z k * 1 i/o i/o i/o
rev. 3.0, 09/04, page 1081 of 1086 table b.2 pin states pin state reset state power-down state power-on type pin name romless expanded mode 8 bits 16 bits expanded mode with rom single- chip mode hardware standby software standby h-udi module standby aud module standby bus- released state no connection tms i z i z i i pulled up internally trst i z i z i i pulled up internally tdi i z i z i i pulled up internally tdo o/z z o/z z o/z o/z o/z h-udi tck i z i z i i pulled up internally table b.3 pin states pin state type pin name hardware standby aud aud aud aud module standby aud reset ( audrst audrst audrst audrst = l) software standby audsrst audsrst audsrst audsrst = 1/ normal operation no connection audrst z l input h input pulled down internally audmd z i i pulled up internally audata0 to audata3 z when audmd = h: i when audmd = l: h (pulled up internally) when audmd = h: i/o when audmd = l: o pulled up internally audck z when audmd = h: i when audmd = l: h (pulled up internally) when audmd = h: i when audmd = l: o pulled up internally aud audsync z when audmd = h: i when audmd = l: h (pulled up internally) when audmd = h: i when audmd = l: o pulled up internally ? : not initial value i : input o : output h : high-level output l : low-level output z : high impedance k : input pins become high-impedance, output pins retain their state. notes: 1. when the port impedance bit (hiz) in the standby control register (sbycr) is set to 1, output pins become high-impedance. 2. when the ckhiz bit in pfcrh is set to 1, becomes high-impedance unconditionally.
rev. 3.0, 09/04, page 1082 of 1086
rev. 3.0, 09/04, page 1083 of 1086 appendix c product lineup table c.1 sh7058 f-ztat product lineup product type model name mark model name package operating temperature (except for w/e of flash memory) sh7058 f-ztat HD64F7058bf80l 64f7058f80 256-pin (fp-256h) ?40 c to 105 c HD64F7058bf80k 64f7058f80 256-pin (fp-256h) ?40 c to 125 c HD64F7058bp80l 64f7058bp80 272-pin (bp-272) ?40 c to 105 c HD64F7058bp80k 64f7058bp80 272-pin (bp-272) ?40 c to 125 c
rev. 3.0, 09/04, page 1084 of 1086
rev. 3.0, 09/04, page 1085 of 1086 appendix d package dimensions figure d.1 shows the fp-256h package dimensions of the sh7058. package code jedec jeita mass (reference value) fp-256h ? conforms 7.5 g * dimension including the plating thickness base material dimension 42.6 0.3 40 0.10 0.08 28 0.5 3.20 3.56 max 0.15 0.10 * 0.17 0.05 0?? 8? 204 129 1 76 77 128 256 205 m * 0.22 0.05 30.6 0.3 0.5 0.2 1.3 1.25 1.25 0.20 0.04 0.15 0.04 as of july, 2002 unit: mm figure d.1 sh7058 package dimensions (fp-256h)
rev. 3.0, 09/04, page 1086 of 1086 0.35 c 0.15 c 0.20 4 21.0 21.0 0.30 ca 1.00 1.00 1.00 1.00 cab m 0.10 272 0.63 0.10 b a 2018161412108642 19 17 15 13 11 9 7 5 3 1 a c e g j l n r u w b d f h k m p t v y 0.30 c b c 0.460.10 2.10max package code jedec jeita mass (reference value) bp-272 ? conforms 1.3 g unit: mm figure d.2 sh7058 package dimensions (bp-272)
renesas superh tm risc engine hardware manual sh-2e sh7058 f-ztat tm publication date: 1st edition, july, 2002 rev.3.00, september 17, 2004 published by: sales strategic planning div. renesas technology corp. edited by: technical documentation & information department renesas kodaira semiconductor co., ltd. ? 2004. renesas technology corp., all rights reserved. printed in japan.
sales strategic planning div. nippon bldg., 2-6-2, ohte-machi, chiyoda-ku, tokyo 100-0004, japan http://www.renesas.com refer to " http://www.renesas.com/en/network " for the latest and detailed information. renesas technology america, inc. 450 holger way, san jose, ca 95134-1368, u.s.a tel: <1> (408) 382-7500, fax: <1> (408) 382-7501 renesas technology europe limited dukes meadow, millboard road, bourne end, buckinghamshire, sl8 5fh, u.k. tel: <44> (1628) 585-100, fax: <44> (1628) 585-900 renesas technology hong kong ltd. 7th floor, north tower, world finance centre, harbour city, 1 canton road, tsimshatsui, kowloon, hong kong tel: <852> 2265-6688, fax: <852> 2730-6071 renesas technology taiwan co., ltd. 10th floor, no.99, fushing north road, taipei, taiwan tel: <886> (2) 2715-2888, fax: <886> (2) 2713-2999 renesas technology (shanghai) co., ltd. unit2607 ruijing building, no.205 maoming road (s), shanghai 200020, china tel: <86> (21) 6472-1001, fax: <86> (21) 6415-2952 renesas technology singapore pte. ltd. 1 harbour front avenue, #06-10, keppel bay tower, singapore 098632 tel: <65> 6213-0200, fax: <65> 6278-8001 renesas sales offices colophon 2.0
2-6-2, ote-machi, chiyoda-ku, tokyo, 100-0004, japan sh-2e sh7058 f-ztat tm hardware manual


▲Up To Search▲   

 
Price & Availability of HD64F7058

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X